From 20a63c490ffe4d7d62ec06469954d184c0731ed8 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 26 Dec 2020 18:57:13 -0800 Subject: [PATCH] =?UTF-8?q?haskellPackages.Agda:=20Fix=20build=20for=20ghc?= =?UTF-8?q?=208.10.2=20=E2=86=92=208.10.3=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../haskell-modules/configuration-ghc-8.10.x.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index 8e53303e9fe..736f1a59d6f 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -98,4 +98,10 @@ self: super: { # Break out of "Cabal < 3.2" constraint. stylish-haskell = doJailbreak super.stylish-haskell; + + # Agda 2.6.1.2 only declares a transformers dependency for ghc < 8.10.3. + Agda = appendPatch super.Agda (pkgs.fetchpatch { + url = "https://github.com/agda/agda/commit/76278c23d447b49f59fac581ca4ac605792aabbc.patch"; + sha256 = "1g34g8a09j73h89pk4cdmri0nb0qg664hkff45amcr9kyz14a9f3"; + }); }