From 0767374c40a7179322f14ca40822b96d248fa686 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 3 Apr 2021 23:24:29 +0200 Subject: [PATCH] haskellPackages.ghc-bignum: unbreak * Enable exactly one backend (Native seems like the safest choice, but GMP also seems sane, interested to hear opinions on this!) * Apply patch which fixes a type mismatch issue between Natural.hs and Natural.hs-boot. --- .../haskell-modules/configuration-common.nix | 19 +++++++++++++++++++ .../configuration-hackage2nix.yaml | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 8f337dd868ef..0f20e73703fd 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1777,4 +1777,23 @@ self: super: { # May be possible to remove at the next release (1.11.0) taskell = doJailbreak super.taskell; + # ghc-bignum is not buildable if none of the three backends + # is explicitly enabled. We enable Native for now as it doesn't + # depend on anything else as oppossed to GMP and FFI. + # Apply patch which fixes a compilation failure we encountered. + # Can be removed if the following issue is resolved / the patch + # is merged and released: + # * https://gitlab.haskell.org/ghc/ghc/-/issues/19638 + # * https://gitlab.haskell.org/ghc/ghc/-/merge_requests/5454 + ghc-bignum = overrideCabal super.ghc-bignum (old: { + configureFlags = (old.configureFlags or []) ++ [ "-f" "Native" ]; + patches = (old.patches or []) ++ [ + (pkgs.fetchpatch { + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/08d1588bf38d83140a86817a7a615db486357d4f.patch"; + sha256 = "1qx4r031y72px291vz38bng9sb23r8zb35s03v5hhawlmgzfzcb5"; + stripLen = 2; + }) + ]; + }); + } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml index 07f3ba4dfa27..9149f6ad0e97 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml @@ -5653,7 +5653,6 @@ broken-packages: - GGg - ggtsTC - gh-labeler - - ghc-bignum - ghc-clippy-plugin - ghc-core-smallstep - ghc-datasize