From 3a6f8567a62151bba209836427fad095dfa2f724 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 9 Jul 2021 16:38:25 +0200 Subject: [PATCH] haskellPackages.large-hashable: unbreak The source tarball now has DOS line endings for some reason, requiring the use of dos2unix. Also needs a jailbreak since the template-haskell bound has become too strict. --- .../haskell-modules/configuration-common.nix | 40 +++++++++++-------- .../configuration-hackage2nix/broken.yaml | 1 - .../haskell-modules/hackage-packages.nix | 2 - 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3cc2c5ceba6a..12339663a1d9 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1828,22 +1828,30 @@ EOT # 2021-05-09: compilation requires patches from master, # remove at next release (current is 0.1.0.4). - large-hashable = appendPatches super.large-hashable [ - # Fix compilation of TH code for GHC >= 8.8 - (pkgs.fetchpatch { - url = "https://github.com/factisresearch/large-hashable/commit/ee7afe4bd181cf15a324c7f4823f7a348e4a0e6b.patch"; - sha256 = "1ha77v0bc6prxacxhpdfgcsgw8348gvhl9y81smigifgjbinphxv"; - excludes = [ - ".travis.yml" - "stack**" - ]; - }) - # Fix cpp invocation - (pkgs.fetchpatch { - url = "https://github.com/factisresearch/large-hashable/commit/7b7c2ed6ac6e096478e8ee00160fa9d220df853a.patch"; - sha256 = "1sf9h3k8jbbgfshzrclaawlwx7k2frb09z2a64f93jhvk6ci6vgx"; - }) - ]; + large-hashable = overrideCabal super.large-hashable (drv: { + # fix line endings which are an issue all of a sudden for an unknown reason + prePatch = '' + find . -type f -print0 | xargs -0 ${pkgs.buildPackages.dos2unix}/bin/dos2unix + '' + (drv.prePatch or ""); + # allow newer template haskell + jailbreak = true; + patches = [ + # Fix compilation of TH code for GHC >= 8.8 + (pkgs.fetchpatch { + url = "https://github.com/factisresearch/large-hashable/commit/ee7afe4bd181cf15a324c7f4823f7a348e4a0e6b.patch"; + sha256 = "1ha77v0bc6prxacxhpdfgcsgw8348gvhl9y81smigifgjbinphxv"; + excludes = [ + ".travis.yml" + "stack**" + ]; + }) + # Fix cpp invocation + (pkgs.fetchpatch { + url = "https://github.com/factisresearch/large-hashable/commit/7b7c2ed6ac6e096478e8ee00160fa9d220df853a.patch"; + sha256 = "1sf9h3k8jbbgfshzrclaawlwx7k2frb09z2a64f93jhvk6ci6vgx"; + }) + ]; + }); # BSON defaults to requiring network instead of network-bsd which is # required nowadays: https://github.com/mongodb-haskell/bson/issues/26 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 1ff1036e3390..7484d9564155 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -2680,7 +2680,6 @@ broken-packages: - language-vhdl - language-webidl - lapack-ffi - - large-hashable - Lastik - latest-npm-version - latex-formulae-image diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index c94fcfd672ec..c90e1b46fac7 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -159536,9 +159536,7 @@ self: { platforms = [ "armv7l-linux" "i686-linux" "x86_64-darwin" "x86_64-linux" ]; - hydraPlatforms = lib.platforms.none; maintainers = with lib.maintainers; [ sternenseemann ]; - broken = true; }) {}; "largeword" = callPackage