aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/haskell-modules/lib.nix
diff options
context:
space:
mode:
authorDavid Johnson <djohnson.m@gmail.com>2018-12-03 13:46:22 -0500
committerPeter Simons <simons@cryp.to>2018-12-03 19:46:22 +0100
commite42d10957d87a5837085cd3273f97e50b67e987d (patch)
treeb25ed9a5c170b5eeb2c1f2a5bba70ab01e06be83 /pkgs/development/haskell-modules/lib.nix
parent4cf1d88d12ff894968a6a406d6ee62f26f998625 (diff)
Add disable core optimizations (#51464)
haskell.lib.disableOptimization: new function Adds a utility function for disabling GHC core optimizations. Significantly reduces build times.
Diffstat (limited to '')
-rw-r--r--pkgs/development/haskell-modules/lib.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix
index 3d67ac213993..e3b73641989a 100644
--- a/pkgs/development/haskell-modules/lib.nix
+++ b/pkgs/development/haskell-modules/lib.nix
@@ -259,6 +259,9 @@ rec {
*/
buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
+ /* Disable core optimizations, significantly speeds up build time */
+ disableOptimization = pkg: appendConfigureFlag pkg "--disable-optimization";
+
/* Turn on most of the compiler warnings and fail the build if any
of them occur. */
failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";