From bc8d3ab9d134baa4517757f6f7ab80857361bd65 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jul 2014 11:02:45 +0200 Subject: initial commit --- default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 default.nix (limited to 'default.nix') 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 {}; + 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) + ''; +} -- cgit v1.2.3