@@ -259,12 +259,38 @@ let
259
259
260
260
# Stackage package names we want to blacklist.
261
261
blacklist = [
262
- # Doesn't build in `normalPkgs.haskellPackages` either
263
- "mercury-api"
262
+ # TODO: Try to remove when https://github.com/NixOS/nixpkgs/pull/128746 is available to us
263
+ "alsa-pcm" "alsa-seq" "ALUT" "OpenAL" "sdl2" "sdl2-gfx" "sdl2-image" "sdl2-mixer" "sdl2-ttf"
264
+
264
265
# depends on `sbv` -> `openjdk`, which pulls in a huge dependency closure
265
266
"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
+
266
276
# https://github.com/nh2/static-haskell-nix/issues/6#issuecomment-420494800
267
277
"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"
268
294
] ;
269
295
270
296
# All Stackage executables who (and whose dependencies) are not marked
644
670
# We need libpq, which does not need systemd,
645
671
# and systemd doesn't currently build with musl.
646
672
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 ;
647
676
} ;
648
677
649
678
procps = previous . procps . override {
659
688
"--enable-static"
660
689
] ;
661
690
} ) ;
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
+ } ) ;
662
700
cairo = previous . cairo . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
663
701
libpng = previous . libpng . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
664
702
libpng_apng = previous . libpng_apng . overrideAttrs ( old : { dontDisableStatic = true ; } ) ;
839
877
# and GHC inserts these flags too early, that is in our case, before
840
878
# the `-lcurl` that pulls in these dependencies; see
841
879
# 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
842
882
# TODO: This can be removed once we have GHC 8.10, due to my merged PR:
843
883
# https://gitlab.haskell.org/ghc/ghc/merge_requests/1589
844
884
"--ld-option=-Wl,--start-group"
917
957
# We use `buildFlags` instead of `configureFlags` so that it's
918
958
# also in effect for packages which specify e.g.
919
959
# `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
+ ] ;
922
972
923
973
# There is currently a 300x `strip` performance regression in
924
974
# `binutils`, making some strips take 5 minutes instead of 1 second.
@@ -1049,6 +1099,9 @@ let
1049
1099
# It's not clear if it's safe to disable this as key functionality may be broken
1050
1100
hslua = dontCheck super . hslua ;
1051
1101
1102
+ # Test suite takes > 1h CPU time with 1600% CPU on my CI machine.
1103
+ hw-balancedparens = dontCheck super . hw-balancedparens ;
1104
+
1052
1105
# Test suite tries to connect to dbus, can't work in sandbox.
1053
1106
credential-store = dontCheck super . credential-store ;
1054
1107
@@ -1093,6 +1146,13 @@ let
1093
1146
pcre-light = super . pcre-light . override { pcre = final . pcre_static ; } ;
1094
1147
bzlib-conduit = super . bzlib-conduit . override { bzip2 = final . bzip2_static ; } ;
1095
1148
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
+
1096
1156
darcs =
1097
1157
addStaticLinkerFlagsWithPkgconfig
1098
1158
# (super.darcs.override { curl = curl_static; })
@@ -1110,34 +1170,46 @@ let
1110
1170
# Currently fails with linker error, see `yesod-paginator` below.
1111
1171
erd = doJailbreak super . erd ;
1112
1172
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 ;
1130
1184
1131
1185
# Test suite segfaults (perhaps because R's test suite also does?).
1132
1186
inline-r = dontCheck super . inline-r ;
1133
1187
1188
+ # Tests fail with: doctests: <command line>: Dynamic loading not supported
1189
+ openapi3 = dontCheck super . openapi3 ;
1190
+
1134
1191
# TODO For the below packages, it would be better if we could somehow make all users
1135
1192
# 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" ;
1136
1203
pg-harness-server =
1137
1204
addStaticLinkerFlagsWithPkgconfig
1138
1205
super . pg-harness-server
1139
1206
[ final . openssl final . postgresql ]
1140
1207
"--libs libpq" ;
1208
+ postgrest =
1209
+ addStaticLinkerFlagsWithPkgconfig
1210
+ super . postgrest
1211
+ [ final . openssl final . postgresql ]
1212
+ "--libs libpq" ;
1141
1213
postgresql-orm =
1142
1214
addStaticLinkerFlagsWithPkgconfig
1143
1215
super . postgresql-orm
@@ -1158,6 +1230,11 @@ let
1158
1230
super . squeal-postgresql
1159
1231
[ final . openssl ]
1160
1232
"--libs openssl" ;
1233
+ tmp-postgres =
1234
+ addStaticLinkerFlagsWithPkgconfig
1235
+ super . tmp-postgres
1236
+ [ final . openssl ]
1237
+ "--libs openssl" ;
1161
1238
1162
1239
xml-to-json =
1163
1240
addStaticLinkerFlagsWithPkgconfig
@@ -1256,6 +1333,10 @@ let
1256
1333
# See https://github.com/haskellari/time-compat/issues/23
1257
1334
time-compat = dontCheck super . time-compat ;
1258
1335
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
+
1259
1340
# Added for #14
1260
1341
tttool = callCabal2nix "tttool" ( final . fetchFromGitHub {
1261
1342
owner = "entropia" ;
1453
1534
bench
1454
1535
dhall
1455
1536
dhall-json
1537
+ postgrest
1456
1538
proto3-suite
1457
1539
hsyslog # Small example of handling https://github.com/NixOS/nixpkgs/issues/43849 correctly
1458
1540
# aura # `aur` maked as broken in nixpkgs, but works here with `allowBroken = true;` actually
0 commit comments