summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-11-05 03:35:53 +0100
committertv <tv@shackspace.de>2014-11-05 03:35:53 +0100
commita00439e7ce552a077d98f787f620179dce0f6df1 (patch)
tree47d42bee786dccbfe4d7ee17f2b41448a9fc335b
parent5bed88371ad74844d798de8415da058a7da18144 (diff)
simplify env.nix
-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 :