@@ -1509,20 +1509,29 @@ let
15091509 # for compiling its `Setup.hs` the Cabal package that comes with GHC
15101510 # (that is in the default GHC package DB) is used instead, which
15111511 # obviously doesn' thave our patches.
1512- statify = drv : with final . haskell . lib ; final . lib . foldl appendConfigureFlag ( disableLibraryProfiling ( disableSharedExecutables ( useFixedCabal drv ) ) ) ( [
1513- "--enable-executable-static" # requires `useFixedCabal`
1514- # `enableShared` seems to be required to avoid `recompile with -fPIC` errors on some packages.
1515- "--extra-lib-dirs=${ final . ncurses . override { enableStatic = true ; enableShared = true ; } } /lib"
1516- # TODO Figure out why this and the below libffi are necessary.
1517- # `working` and `workingStackageExecutables` don't seem to need that,
1518- # but `static-stack2nix-builder-example` does.
1519- ] ++ final . lib . optionals ( ! integer-simple ) [
1520- "--extra-lib-dirs=${ final . gmp6 . override { withStatic = true ; } } /lib"
1521- ] ++ final . lib . optionals ( ! integer-simple && approach == "pkgsMusl" ) [
1522- # GHC needs this if it itself wasn't already built against static libffi
1523- # (which is the case in `pkgsStatic` only):
1524- "--extra-lib-dirs=${ final . libffi } /lib"
1525- ] ) ;
1512+ statify = drv :
1513+ with final . haskell . lib ;
1514+ final . lib . foldl
1515+ appendConfigureFlag
1516+ ( disableLibraryProfiling ( disableSharedExecutables ( useFixedCabal drv ) ) )
1517+ ( builtins . concatLists [
1518+ [
1519+ "--enable-executable-static" # requires `useFixedCabal`
1520+ # `enableShared` seems to be required to avoid `recompile with -fPIC` errors on some packages.
1521+ "--extra-lib-dirs=${ final . ncurses . override { enableStatic = true ; enableShared = true ; } } /lib"
1522+ ]
1523+ # TODO Figure out why this and the below libffi are necessary.
1524+ # `working` and `workingStackageExecutables` don't seem to need that,
1525+ # but `static-stack2nix-builder-example` does.
1526+ ( final . lib . optionals ( ! integer-simple ) [
1527+ "--extra-lib-dirs=${ final . gmp6 . override { withStatic = true ; } } /lib"
1528+ ] )
1529+ ( final . lib . optionals ( ! integer-simple && approach == "pkgsMusl" ) [
1530+ # GHC needs this if it itself wasn't already built against static libffi
1531+ # (which is the case in `pkgsStatic` only):
1532+ "--extra-lib-dirs=${ final . libffi } /lib"
1533+ ] )
1534+ ] ) ;
15261535 in
15271536 final . lib . mapAttrs
15281537 ( name : value :
0 commit comments