summaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-03-14 22:32:35 +0100
committertv <tv@krebsco.de>2021-03-14 22:32:35 +0100
commitd151f66a8500f1b0a6aa2224f19e18062b172931 (patch)
tree24199e10c9ebc72b898188a0f2bdcf4b2e6ee244 /shell.nix
parent032cb86ff8108eb4915a692015da344a41f78506 (diff)
wipwip
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix22
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
+ ];
+ })