summaryrefslogtreecommitdiffstats
path: root/env.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-11-03 23:56:37 +0100
committertv <tv@shackspace.de>2014-11-03 23:56:37 +0100
commit9164dbadad60ca5594c9dbc4fabebe62e7c9a123 (patch)
treec7a4ae72afa6f675e8c94227f0ba5b26747f53cc /env.nix
parentd0129ff4d13cedbc6d1b85cadddc724783c8002a (diff)
add default.nix and env.nix
Diffstat (limited to 'env.nix')
-rw-r--r--env.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/env.nix b/env.nix
new file mode 100644
index 0000000..2b6aae1
--- /dev/null
+++ b/env.nix
@@ -0,0 +1,25 @@
+let
+ name = "cgroup-server";
+ version = "1";
+ buildInputs = with pkgs; [
+ hsEnv
+ ];
+ extraCmds = with pkgs; ''
+ 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
+ ]);
+in pkgs.myEnvFun {
+ name = "${name}-${version}";
+ inherit buildInputs extraCmds;
+}
+# vim: set fdm=marker :