diff options
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -1,9 +1,18 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | 1 | { nixpkgs ? import <nixpkgs> {}, compiler ? "default" }: |
2 | }: | ||
3 | 2 | ||
4 | pkgs.lib.overrideDerivation (pkgs.haskellPackages.callPackage ./default.nix {}) (oldArgs: { | 3 | let |
5 | buildInputs = with pkgs; [ cabal2nix gup ]; | 4 | inherit (nixpkgs) pkgs; |
6 | shellHook = '' | 5 | |
7 | export PROMPT_INFO=${oldArgs.name} | 6 | haskellPackages = if compiler == "default" |
8 | ''; | 7 | then pkgs.haskellPackages |
9 | }) | 8 | else pkgs.haskell.packages.${compiler}; |
9 | |||
10 | drv = haskellPackages.callPackage ./postdelay.nix {}; | ||
11 | in | ||
12 | pkgs.stdenv.lib.overrideDerivation drv.env (oldAttrs: { | ||
13 | buildInputs = oldAttrs.buildInputs ++ (with pkgs; [ cabal2nix gup ]); | ||
14 | shellHook = '' | ||
15 | ${oldAttrs.shellHook} | ||
16 | export PROMPT_INFO="${oldAttrs.name}" | ||
17 | ''; | ||
18 | }) | ||