@@ -259,12 +259,38 @@ let
259259
260260 # Stackage package names we want to blacklist.
261261 blacklist = [
262- # Doesn't build in `normalPkgs.haskellPackages` either
263- "mercury-api"
262+ # TODO: Try to remove when https://github.com/NixOS/nixpkgs/pull/129558 has landed
263+ "alsa-pcm" "alsa-seq" "ALUT" "OpenAL" "sdl2" "sdl2-gfx" "sdl2-image" "sdl2-mixer" "sdl2-ttf"
264+
264265 # depends on `sbv` -> `openjdk`, which pulls in a huge dependency closure
265266 "crackNum"
267+
268+ # Incorrectly depends on `ocaml`, which `pkgsMusl` cannot currently build
269+ # (error: `ld: -r and -pie may not be used together`).
270+ # TODO: Remove when https://github.com/NixOS/cabal2nix/pull/509 has landed.
271+ "liquid-fixpoint"
272+
273+ # Doesn't build in `normalPkgs.haskellPackages` either
274+ "mercury-api"
275+
266276 # https://github.com/nh2/static-haskell-nix/issues/6#issuecomment-420494800
267277 "sparkle"
278+
279+ # These ones currently don't compile for not-yet-investigated reasons:
280+ "amqp-utils"
281+ "elynx"
282+ "hopenpgp-tools"
283+ "hw-eliasfano"
284+ "hw-ip"
285+ "leveldb-haskell"
286+ "mpi-hs"
287+ "mpi-hs-binary"
288+ "mpi-hs-cereal"
289+ "place-cursor-at"
290+ "sandwich-webdriver"
291+ "slynx"
292+ "spacecookie"
293+ "zip"
268294 ] ;
269295
270296 # All Stackage executables who (and whose dependencies) are not marked
644670 # We need libpq, which does not need systemd,
645671 # and systemd doesn't currently build with musl.
646672 enableSystemd = false ;
673+ # Kerberos is problematic on static:
674+ # configure: error: could not find function 'gss_init_sec_context' required for GSSAPI
675+ gssSupport = false ;
647676 } ;
648677
649678 procps = previous . procps . override {
659688 "--enable-static"
660689 ] ;
661690 } ) ;
691+ fontforge = previous . fontforge . override ( {
692+ # Currently produces linker errors like:
693+ # ld: ../../lib/libfontforge.so.4: undefined reference to `_kBrotliPrefixCodeRanges'
694+ # ld: ../../lib/libfontforge.so.4: undefined reference to `woff2::Write255UShort(std::vector<unsigned char, std::allocator<unsi>
695+ # ld: ../../lib/libfontforge.so.4: undefined reference to `BrotliGetDictionary'
696+ # ld: ../../lib/libfontforge.so.4: undefined reference to `woff2::Store255UShort(int, unsigned long*, unsigned char*)'
697+ # ld: ../../lib/libfontforge.so.4: undefined reference to `BrotliDefaultAllocFunc'
698+ woff2 = null ;
699+ } ) ;
662700 cairo = previous . cairo . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
663701 libpng = previous . libpng . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
664702 libpng_apng = previous . libpng_apng . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
839877 # and GHC inserts these flags too early, that is in our case, before
840878 # the `-lcurl` that pulls in these dependencies; see
841879 # https://github.com/haskell/cabal/pull/5451#issuecomment-406759839
880+ # Note that current binutils emit a warning:
881+ # ld: missing --end-group; added as last command line option
842882 # TODO: This can be removed once we have GHC 8.10, due to my merged PR:
843883 # https://gitlab.haskell.org/ghc/ghc/merge_requests/1589
844884 "--ld-option=-Wl,--start-group"
917957 # We use `buildFlags` instead of `configureFlags` so that it's
918958 # also in effect for packages which specify e.g.
919959 # `ghc-options: -O2` in their .cabal file.
920- buildFlags = ( attrs . buildFlags or [ ] ) ++
921- final . lib . optional disableOptimization "--ghc-option=-O0" ;
960+ buildFlags = ( attrs . buildFlags or [ ] ) ++ builtins . concatLists [
961+ ( final . lib . optional disableOptimization "--ghc-option=-O0" )
962+ # GHC compilation does not scale well on high-core machines like our CI.
963+ # Making compilation more efficient.
964+ # (map (o: "--ghc-option=" + o) [
965+ # "-j4" # Limit parallel compilation
966+ # "+RTS"
967+ # "-maxN4" # Limit threads
968+ # "-A64M" "-qb0" # See https://trofi.github.io/posts/193-scaling-ghc-make.html
969+ # "-RTS"
970+ # ])
971+ ] ;
922972
923973 # There is currently a 300x `strip` performance regression in
924974 # `binutils`, making some strips take 5 minutes instead of 1 second.
@@ -1049,6 +1099,9 @@ let
10491099 # It's not clear if it's safe to disable this as key functionality may be broken
10501100 hslua = dontCheck super . hslua ;
10511101
1102+ # Test suite takes > 1h CPU time with 1600% CPU on my CI machine.
1103+ hw-balancedparens = dontCheck super . hw-balancedparens ;
1104+
10521105 # Test suite tries to connect to dbus, can't work in sandbox.
10531106 credential-store = dontCheck super . credential-store ;
10541107
@@ -1093,6 +1146,13 @@ let
10931146 pcre-light = super . pcre-light . override { pcre = final . pcre_static ; } ;
10941147 bzlib-conduit = super . bzlib-conduit . override { bzip2 = final . bzip2_static ; } ;
10951148
1149+ # Tests fail with: doctests: <command line>: Dynamic loading not supported
1150+ BNFC = dontCheck super . BNFC ;
1151+
1152+ # 200 ms test timeout is not suitable for massively parallel CI.
1153+ # See https://github.com/jensblanck/cdar/issues/7
1154+ cdar-mBound = dontCheck super . cdar-mBound ;
1155+
10961156 darcs =
10971157 addStaticLinkerFlagsWithPkgconfig
10981158 # (super.darcs.override { curl = curl_static; })
@@ -1110,34 +1170,46 @@ let
11101170 # Currently fails with linker error, see `yesod-paginator` below.
11111171 erd = doJailbreak super . erd ;
11121172
1113- hmatrix = ( ( drv : enableCabalFlag drv "no-random_r" ) ( overrideCabal super . hmatrix ( old : {
1114- # The patch does not apply cleanly because the cabal file
1115- # was Hackage-revisioned, which converted it to Windows line endings
1116- # (https://github.com/haskell-numerics/hmatrix/issues/302);
1117- # convert it back.
1118- prePatch = ( old . prePatch or "" ) + ''
1119- ${ final . dos2unix } /bin/dos2unix ${ old . pname } .cabal
1120- '' ;
1121- patches = ( old . patches or [ ] ) ++ [
1122- ( final . fetchpatch {
1123- url = "https://github.com/nh2/hmatrix/commit/e9da224bce287653f96235bd6ae02da6f8f8b219.patch" ;
1124- name = "hmatrix-Allow-disabling-random_r-usage-manually.patch" ;
1125- sha256 = "1fpv0y5nnsqcn3qi767al694y01km8lxiasgwgggzc7816xix0i2" ;
1126- stripLen = 2 ;
1127- } )
1128- ] ;
1129- } ) ) ) . override { openblasCompat = final . openblasCompat ; } ;
1173+ # Tests fail with: doctests: <command line>: Dynamic loading not supported
1174+ headroom = dontCheck super . headroom ;
1175+
1176+ hmatrix =
1177+ # musl does not have `random_r()`.
1178+ ( enableCabalFlag super . hmatrix "no-random_r" )
1179+ . override { openblasCompat = final . openblasCompat ; } ;
1180+
1181+ # Tests fail with: doctests: <command line>: Dynamic loading not supported
1182+ hw-xml = dontCheck super . hw-xml ;
1183+ hw-packed-vector = dontCheck super . hw-packed-vector ;
11301184
11311185 # Test suite segfaults (perhaps because R's test suite also does?).
11321186 inline-r = dontCheck super . inline-r ;
11331187
1188+ # Tests fail with: doctests: <command line>: Dynamic loading not supported
1189+ openapi3 = dontCheck super . openapi3 ;
1190+
11341191 # TODO For the below packages, it would be better if we could somehow make all users
11351192 # of postgresql-libpq link in openssl via pkgconfig.
1193+ hasql-notifications =
1194+ addStaticLinkerFlagsWithPkgconfig
1195+ super . hasql-notifications
1196+ [ final . openssl final . postgresql ]
1197+ "--libs libpq" ;
1198+ hasql-queue =
1199+ addStaticLinkerFlagsWithPkgconfig
1200+ super . hasql-queue
1201+ [ final . openssl final . postgresql ]
1202+ "--libs libpq" ;
11361203 pg-harness-server =
11371204 addStaticLinkerFlagsWithPkgconfig
11381205 super . pg-harness-server
11391206 [ final . openssl final . postgresql ]
11401207 "--libs libpq" ;
1208+ postgrest =
1209+ addStaticLinkerFlagsWithPkgconfig
1210+ super . postgrest
1211+ [ final . openssl final . postgresql ]
1212+ "--libs libpq" ;
11411213 postgresql-orm =
11421214 addStaticLinkerFlagsWithPkgconfig
11431215 super . postgresql-orm
@@ -1158,6 +1230,11 @@ let
11581230 super . squeal-postgresql
11591231 [ final . openssl ]
11601232 "--libs openssl" ;
1233+ tmp-postgres =
1234+ addStaticLinkerFlagsWithPkgconfig
1235+ super . tmp-postgres
1236+ [ final . openssl ]
1237+ "--libs openssl" ;
11611238
11621239 xml-to-json =
11631240 addStaticLinkerFlagsWithPkgconfig
@@ -1256,6 +1333,10 @@ let
12561333 # See https://github.com/haskellari/time-compat/issues/23
12571334 time-compat = dontCheck super . time-compat ;
12581335
1336+ # Test suite takes > 1h CPU time with 1600% CPU on my CI machine.
1337+ # Does pass after that time though, maybe high thread counds work badly here.
1338+ tomland = dontCheck super . tomland ;
1339+
12591340 # Added for #14
12601341 tttool = callCabal2nix "tttool" ( final . fetchFromGitHub {
12611342 owner = "entropia" ;
14531534 bench
14541535 dhall
14551536 dhall-json
1537+ postgrest
14561538 proto3-suite
14571539 hsyslog # Small example of handling https://github.com/NixOS/nixpkgs/issues/43849 correctly
14581540 # aura # `aur` maked as broken in nixpkgs, but works here with `allowBroken = true;` actually
0 commit comments