diff options
author | tv <tv@shackspace.de> | 2014-11-05 03:35:53 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-11-05 03:35:53 +0100 |
commit | a00439e7ce552a077d98f787f620179dce0f6df1 (patch) | |
tree | 47d42bee786dccbfe4d7ee17f2b41448a9fc335b | |
parent | 5bed88371ad74844d798de8415da058a7da18144 (diff) |
simplify env.nix
-rw-r--r-- | env.nix | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -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 : |