blob: 0377835c199ca16b2b37cde1346aa6cf4b879fa0 (
plain)
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
|
{ pkgs ? import <nixpkgs> {}
}:
let
name = "cgserver";
version = "1";
buildInputs = with pkgs; [
hsEnv
];
extraCmds = ''
if test -d "\$HOME/.history"; then
export HISTFILE="\$HOME/.history/env-${name}"
fi
$(grep export ${hsEnv.outPath}/bin/ghc)
'';
hsEnv = pkgs.haskellPackages_ghc783_profiling.ghcWithPackages
(self : with self;
(callPackage ./cgserver.nix {}).nativeBuildInputs ++
[
cabalInstall
]
);
in pkgs.myEnvFun {
name = "${name}-${version}";
inherit buildInputs extraCmds;
}
|