diff options
author | tv <tv@shackspace.de> | 2014-07-27 11:02:45 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-07-27 11:03:05 +0200 |
commit | bc8d3ab9d134baa4517757f6f7ab80857361bd65 (patch) | |
tree | 046f79d43cc0dfb99cdca71918c505530b834bb1 /default.nix |
initial commit
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..bba6906 --- /dev/null +++ b/default.nix @@ -0,0 +1,24 @@ + +let + pkgs = import <nixpkgs> {}; + hsEnv = pkgs.haskellPackages.ghcWithPackages (hsPkgs : with hsPkgs; [ + mtl + ]); +in + +pkgs.myEnvFun { + name = "hack"; + buildInputs = with pkgs; [ + hsEnv + ]; + + # XXX https://nixos.org/wiki/Haskell says: + # Since tools (such as hdevtools [snap-loader-dynamic in our case]) that + # rely on the ghc-api to do haskell language manipulation are sensitive + # to nix-wrapping of ghc, we need the extraCmds line to ensure the + # proper ghc-wrapping environment variables are set inside the + # dev-environment shell. + extraCmds = '' + $(grep export ${hsEnv.outPath}/bin/ghc) + ''; +} |