diff options
author | tv <tv@krebsco.de> | 2021-03-14 22:32:35 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2021-03-14 22:32:35 +0100 |
commit | d151f66a8500f1b0a6aa2224f19e18062b172931 (patch) | |
tree | 24199e10c9ebc72b898188a0f2bdcf4b2e6ee244 /shell.nix | |
parent | 032cb86ff8108eb4915a692015da344a41f78506 (diff) |
wipwip
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..836da25 --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: + +let + + inherit (nixpkgs) pkgs; + + haskellPackages = if compiler == "default" + then pkgs.haskellPackages + else pkgs.haskell.packages.${compiler}; + + variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; + + drv = variant (haskellPackages.callPackage ./pager.nix { + }); + +in + + pkgs.lib.overrideDerivation drv.env (oldAttrs: { + buildInputs = [ + pkgs.cabal-install + ]; + }) |