From a5b85222ff8b419787b7901ac54625acec692788 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Tue, 2 Apr 2019 14:36:23 +0900 Subject: [PATCH] Add option to disable library-for-ghci in the generic haskell builder. Closes https://github.com/NixOS/nixpkgs/pull/58743. --- pkgs/development/haskell-modules/generic-builder.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 083dee9cf94..a8d530516a5 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -81,6 +81,10 @@ in # built. Will delay failures, if any, to compile time. allowInconsistentDependencies ? false , maxBuildCores ? 4 # GHC usually suffers beyond -j4. https://ghc.haskell.org/trac/ghc/ticket/9221 +, # Build a pre-linked .o file for this Haskell library. This can make it + # slightly faster to load this library into GHCi, but takes extra disk space + # and compile time. + enableLibraryForGhci ? true } @ args: assert editedCabalFile != null -> revision != null; @@ -169,7 +173,7 @@ let (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests")) (enableFeature doBenchmark "benchmarks") "--enable-library-vanilla" # TODO: Should this be configurable? - "--enable-library-for-ghci" # TODO: Should this be configurable? + (enableFeature enableLibraryForGhci "library-for-ghci") ] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [ "--ghc-option=-split-sections" ] ++ optionals dontStrip [