summaryrefslogtreecommitdiff
path: root/shell.nix
blob: 7afbfab6c8f6d4b2fd819f1264fc203adfc7d63e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:

let
  inherit (nixpkgs) pkgs;

  haskellPackages = if compiler == "default"
                       then pkgs.haskellPackages
                       else pkgs.haskell.packages.${compiler};

  drv = haskellPackages.callPackage ./postdelay.nix {};
in
  pkgs.stdenv.lib.overrideDerivation drv.env (oldAttrs: {
    buildInputs = oldAttrs.buildInputs ++ (with pkgs; [ cabal2nix gup haskellPackages.hlint ]);
    shellHook = ''
      ${oldAttrs.shellHook}
      export PROMPT_INFO="${oldAttrs.name}"
    '';
  })