haskellPackages.Agda: Fix build for ghc 8.10.2 → 8.10.3 upgrade
Commit 1998b95adc6b5a9aef336e45955a01575bd898f1 “haskellPackages:
update default compiler from ghc 8.10.2 to version 8.10.3” broke Agda
because Agda.cabal incorrectly declares a transformers dependency only
for ghc < 8.10.3:
if impl(ghc >= 8.6.4) && impl(ghc < 8.10.3)
build-depends: transformers == 0.5.6.2
if impl(ghc >= 8.4) && impl(ghc < 8.6.4)
build-depends: transformers == 0.5.5.0
if impl(ghc < 8.4)
build-depends: transformers == 0.5.2.0
leading to this error:
src/full/Agda/Utils/Maybe.hs:13:1: error:
Could not load module ‘Control.Monad.Trans.Maybe’
It is a member of the hidden package ‘transformers-0.5.6.2’.
Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
13 | import Control.Monad.Trans.Maybe
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
commit20a63c490ffe4d7d62ec06469954d184c0731ed8
authorAnders Kaseorg <andersk@mit.edu>
dateSat 26 Dec 2020, 18:57 (6 years ago)
parent5c23d98
pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix+6
@@ -98,4 +98,10 @@ self: super: {
9898
9999 # Break out of "Cabal < 3.2" constraint.
100100 stylish-haskell = doJailbreak super.stylish-haskell;
101+
102+ # Agda 2.6.1.2 only declares a transformers dependency for ghc < 8.10.3.
103+ Agda = appendPatch super.Agda (pkgs.fetchpatch {
104+ url = "https://github.com/agda/agda/commit/76278c23d447b49f59fac581ca4ac605792aabbc.patch";
105+ sha256 = "1g34g8a09j73h89pk4cdmri0nb0qg664hkff45amcr9kyz14a9f3";
106+ });
101107}