@@ -1,5 +1,11 @@
1−{ stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, ghcForComponent, hsPkgs, runCommand, libffi, gmp, zlib, ncurses, nodejs }:
2−
1+{ stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, ghcForComponent, hsPkgs, runCommand, libffi, gmp, zlib, ncurses, numactl, nodejs }:
2+let
3+ # These are here to avoid multiple calls to override
4+ gmpStatic = gmp.override { withStatic = true; };
5+ zlibStatic = zlib.static;
6+ ncursesStatic = ncurses.override { enableStatic = true; };
7+ numactlStatic = numactl.overrideAttrs (_: { configureFlags = "--enable-static"; });
8+in
39lib.makeOverridable (
410let self =
511{ componentId
@@ -120,9 +126,10 @@ let
120126 "--disable-executable-dynamic"
121127 "--ghc-option=-optl=-pthread"
122128 "--ghc-option=-optl=-static"
123− "--ghc-option=-optl=-L${gmp.override { withStatic = true; }}/lib"
124− "--ghc-option=-optl=-L${zlib.static}/lib"
125− "--ghc-option=-optl=-L${ncurses.override { enableStatic = true; }}/lib"
129+ "--ghc-option=-optl=-L${gmpStatic}/lib"
130+ "--ghc-option=-optl=-L${zlibStatic}/lib"
131+ "--ghc-option=-optl=-L${ncursesStatic}/lib"
132+ "--ghc-option=-optl=-L${numactlStatic}/lib"
126133 ] ++ lib.optional enableSeparateDataOutput "--datadir=$data/share/${ghc.name}"
127134 ++ lib.optional doHaddock' "--docdir=${docdir "$doc"}"
128135 ++ lib.optional (enableLibraryProfiling || enableExecutableProfiling) "--profiling-detail=${profilingDetail}"