summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--env.nix27
1 files changed, 15 insertions, 12 deletions
diff --git a/env.nix b/env.nix
index bb11ab4..da5df4d 100644
--- a/env.nix
+++ b/env.nix
@@ -1,25 +1,28 @@
+{ pkgs ? import <nixpkgs> {}
+}:
+
let
name = "cgserver";
version = "1";
+
buildInputs = with pkgs; [
hsEnv
];
- extraCmds = with pkgs; ''
+
+ extraCmds = ''
export HISTFILE="\$HOME/.history/env-${name}"
$(grep export ${hsEnv.outPath}/bin/ghc)
'';
- pkgs = import <nixpkgs> {} // (with pkgs; {
- });
- hsEnv = pkgs
- .haskellPackages_ghc783_profiling
- .ghcWithPackages (hsPkgs: with hsPkgs;
- let
- in
- (callPackage ./. { devel = true; }).nativeBuildInputs ++ [
- cabalInstall
- ]);
+
+ hsEnv = pkgs.haskellPackages_ghc783_profiling.ghcWithPackages
+ (self : with self;
+ (callPackage ./. {}).nativeBuildInputs ++
+ [
+ cabalInstall
+ ]
+ );
+
in pkgs.myEnvFun {
name = "${name}-${version}";
inherit buildInputs extraCmds;
}
-# vim: set fdm=marker :