-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.nix
45 lines (38 loc) · 1.13 KB
/
build.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ pkgs, compiler ? "ghc883" }:
let
gitignore = pkgs.nix-gitignore.gitignoreSourcePure [ ./.gitignore ];
haskellLib = pkgs.haskell.lib;
myHaskellPackages = pkgs.haskell.packages.${compiler}.override {
overrides = se: su: {
gi-gtk-declarative = haskellLib.markUnbroken (su.gi-gtk-declarative.overrideAttrs (oldAttrs: {
doCheck = false;
}));
gi-gtk-declarative-app-simple = haskellLib.markUnbroken su.gi-gtk-declarative-app-simple;
"nixos-manager" = haskellLib.overrideCabal
(se.callCabal2nix "nixos-manager" (gitignore ./.) {})
(drv: {
buildTools = drv.buildTools or [] ++ [ pkgs.makeWrapper ];
postFixup = ''
wrapProgram $out/bin/nixos-manager \
--prefix PATH : "${pkgs.lib.makeBinPath [pkgs.gksu]}"
'';
});
};
};
in
rec
{
"nixos-manager" = myHaskellPackages."nixos-manager";
shell = myHaskellPackages.shellFor {
packages = p: [
p."nixos-manager"
];
buildInputs = with pkgs.haskellPackages; [
cabal-install
hlint
pkgs.niv
pkgs.nixpkgs-fmt
];
withHoogle = true;
};
}