aboutsummaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-07-27 11:16:17 +0200
committerYann Herklotz <git@yannherklotz.com>2019-07-27 11:16:17 +0200
commitd57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2 (patch)
treee49085644295d968108b169502b33bdd4c95aee5 /shell.nix
parent7e5621f79dfbeb2e5112bef931c4cfc858a2f19e (diff)
downloadverismith-d57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2.tar.gz
verismith-d57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2.zip
Make the nix build more concise
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix26
1 files changed, 1 insertions, 25 deletions
diff --git a/shell.nix b/shell.nix
index 733234f..910b922 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,25 +1 @@
-{ compiler ? "default", doBenchmark ? false }:
-
-let
- config = {
- packageOverrides = pkgs: rec {
- haskellPackages = pkgs.haskellPackages.override {
- overrides = haskellPackagesNew: haskellPackagesOld: rec {
- hedgehog-fn = haskellPackagesNew.callPackage ./nix/hedgehog-fn.nix {};
- tomland = haskellPackagesNew.callPackage ./nix/tomland.nix {};
- parser-combinators = haskellPackagesNew.callPackage ./nix/parser-combinators.nix {};
- };
- };
- };
- };
- pkgs = import <nixpkgs> { inherit config; };
-
- 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 (import ./.) {});
-in
- if pkgs.lib.inNixShell then drv.env else drv
+(import ./. {}).env