haskellPackages: configuration cleanup

This commit is contained in:
Artur Cygan 2022-11-24 01:24:26 +01:00
parent ee6815b910
commit 5b4ed2a6aa
3 changed files with 24 additions and 68 deletions

View file

@ -63,7 +63,7 @@ self: super: {
# Jailbreaks & Version Updates
hashable-time = doJailbreak super.hashable-time;
retrie = doJailbreak (dontCheck super.retrie_1_2_1_1);
retrie = doJailbreak super.retrie_1_2_1_1;
# Depends on utf8-light which isn't maintained / doesn't support base >= 4.16
# https://github.com/haskell-infra/hackage-trustees/issues/347

View file

@ -4489,7 +4489,6 @@ broken-packages:
- sdl2-cairo-image
- sdl2-compositor
- sdl2-fps
- SDL-mpeg
- sdr
- seacat
- seakale

View file

@ -91,10 +91,6 @@ self: super: builtins.intersectAttrs super {
'';
}) super.jni;
# The package doesn't know about the AL include hierarchy.
# https://github.com/phaazon/al/issues/1
al = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.al;
# Won't find it's header files without help.
sfml-audio = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.sfml-audio;
@ -119,29 +115,13 @@ self: super: builtins.intersectAttrs super {
];
}) super.arbtt;
hzk = overrideCabal (drv: {
preConfigure = "sed -i -e /include-dirs/d hzk.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ];
}) super.hzk;
haskakafka = overrideCabal (drv: {
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
}) super.haskakafka;
# library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32
hw-kafka-client = dontCheck (overrideCabal (drv: {
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
}) super.hw-kafka-client);
hzk = appendConfigureFlag "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" super.hzk;
# Foreign dependency name clashes with another Haskell package.
libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; };
# Heist's test suite requires system pandoc
heist = overrideCabal (drv: {
testToolDepends = [pkgs.pandoc];
}) super.heist;
heist = addTestToolDepend pkgs.pandoc super.heist;
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
gio = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.gio));
@ -326,30 +306,16 @@ self: super: builtins.intersectAttrs super {
greenclip = addExtraLibrary pkgs.xorg.libXdmcp super.greenclip;
# The cabal files for these libraries do not list the required system dependencies.
libjwt-typed = overrideCabal (drv: {
librarySystemDepends = [ pkgs.libjwt ];
}) super.libjwt-typed;
miniball = overrideCabal (drv: {
librarySystemDepends = [ pkgs.miniball ];
}) super.miniball;
SDL-image = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or [];
}) super.SDL-image;
SDL-ttf = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ];
}) super.SDL-ttf;
SDL-mixer = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ];
}) super.SDL-mixer;
SDL-gfx = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ];
}) super.SDL-gfx;
SDL-mpeg = overrideCabal (drv: {
configureFlags = (drv.configureFlags or []) ++ [
"--extra-lib-dirs=${pkgs.smpeg}/lib"
"--extra-include-dirs=${pkgs.smpeg}/include/smpeg"
];
}) super.SDL-mpeg;
libjwt-typed = addExtraLibrary pkgs.libjwt super.libjwt-typed;
miniball = addExtraLibrary pkgs.miniball super.miniball;
SDL-image = addExtraLibrary pkgs.SDL super.SDL-image;
SDL-ttf = addExtraLibrary pkgs.SDL super.SDL-ttf;
SDL-mixer = addExtraLibrary pkgs.SDL super.SDL-mixer;
SDL-gfx = addExtraLibrary pkgs.SDL super.SDL-gfx;
SDL-mpeg = appendConfigureFlags [
"--extra-lib-dirs=${pkgs.smpeg}/lib"
"--extra-include-dirs=${pkgs.smpeg.dev}/include/smpeg"
] super.SDL-mpeg;
# https://github.com/ivanperez-keera/hcwiid/pull/4
hcwiid = overrideCabal (drv: {
@ -383,9 +349,7 @@ self: super: builtins.intersectAttrs super {
}) super.fltkhs;
# https://github.com/skogsbaer/hscurses/pull/26
hscurses = overrideCabal (drv: {
librarySystemDepends = (drv.librarySystemDepends or []) ++ [ pkgs.ncurses ];
}) super.hscurses;
hscurses = addExtraLibrary pkgs.ncurses super.hscurses;
# Looks like Avahi provides the missing library
dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; };
@ -407,9 +371,7 @@ self: super: builtins.intersectAttrs super {
# so disable this on Darwin only
${if pkgs.stdenv.isDarwin then null else "GLUT"} = addPkgconfigDepend pkgs.freeglut (appendPatch ./patches/GLUT.patch super.GLUT);
libsystemd-journal = overrideCabal (old: {
librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
}) super.libsystemd-journal;
libsystemd-journal = doJailbreak (addExtraLibrary pkgs.systemd super.libsystemd-journal);
# does not specify tests in cabal file, instead has custom runTest cabal hook,
# so cabal2nix will not detect test dependencies.
@ -529,11 +491,11 @@ self: super: builtins.intersectAttrs super {
sed -i -e 's|"bitwuzla"|"${pkgs.bitwuzla}/bin/bitwuzla"|' Data/SBV/Provers/Bitwuzla.hs
sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs
sed -i -e 's|"cvc4"|"${pkgs.cvc4}/bin/cvc4"|' Data/SBV/Provers/CVC4.hs
sed -i -e 's|"cvc5"|"${pkgs.cvc5}/bin/cvc5"|' Data/SBV/Provers/CVC5.hs
sed -i -e 's|"yices-smt2"|"${pkgs.yices}/bin/yices-smt2"|' Data/SBV/Provers/Yices.hs
sed -i -e 's|"z3"|"${pkgs.z3}/bin/z3"|' Data/SBV/Provers/Z3.hs
# Solvers we don't provide are removed from tests
sed -i -e 's|, cvc5||' SBVTestSuite/SBVConnectionTest.hs
sed -i -e 's|, mathSAT||' SBVTestSuite/SBVConnectionTest.hs
sed -i -e 's|, dReal||' SBVTestSuite/SBVConnectionTest.hs
'';
@ -734,13 +696,9 @@ self: super: builtins.intersectAttrs super {
postgresql-libpq-notify = dontCheck super.postgresql-libpq-notify;
postgresql-pure = dontCheck super.postgresql-pure;
retrie = overrideCabal (drv: {
testToolDepends = [ pkgs.git pkgs.mercurial ] ++ drv.testToolDepends or [];
}) super.retrie;
retrie_1_2_0_0 = overrideCabal (drv: {
testToolDepends = [ pkgs.git pkgs.mercurial ] ++ drv.testToolDepends or [];
}) super.retrie_1_2_0_0;
retrie = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie;
retrie_1_2_0_0 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_0_0;
retrie_1_2_1_1 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_1_1;
haskell-language-server = let
# This wrapper will be included in the sdist in the next release, then we can remove this custom fetch.
@ -1059,12 +1017,11 @@ self: super: builtins.intersectAttrs super {
# Tests assume dist-newstyle build directory is present
cabal-hoogle = dontCheck super.cabal-hoogle;
nfc = overrideCabal (drv: {
isExecutable = true;
executableHaskellDepends = with self; drv.executableHaskellDepends or [] ++ [ base base16-bytestring bytestring ];
configureFlags = drv.configureFlags or [] ++ [ "-fbuild-examples" ];
enableSeparateBinOutput = true;
}) super.nfc;
nfc = lib.pipe super.nfc [
enableSeparateBinOutput
(addBuildDepend self.base16-bytestring)
(appendConfigureFlag "-fbuild-examples")
];
# Wants to execute cabal-install to (re-)build itself
hint = dontCheck super.hint;