From 12d12e5b1f71ea6f9b0b68bc23ac0c54334e711a Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Wed, 18 Nov 2020 22:23:46 +0900 Subject: [PATCH] spago: get building again with ghc8102 --- .../haskell-modules/configuration-nix.nix | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index d1e7da50f5e1..b9fd1a6fcdf9 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -664,9 +664,26 @@ self: super: builtins.intersectAttrs super { let # Spago needs a small patch to work with the latest versions of rio. # https://github.com/purescript/spago/pull/647 - spagoWithPatches = appendPatch super.spago (pkgs.fetchpatch { - url = "https://github.com/purescript/spago/pull/647/commits/917ee541a966db74f0f5d11f2f86df0030c35dd7.patch"; - sha256 = "1nspqgcjk6z90cl9zhard0rn2q979kplcqz72x8xv5mh57zabk0w"; + spagoWithPatches = overrideCabal (appendPatch super.spago ( + # Spago-0.17 needs a small patch to work with the latest version of dhall. + # This can probably be removed with Spago-0.18. + # https://github.com/purescript/spago/pull/695 + pkgs.fetchpatch { + url = "https://github.com/purescript/spago/commit/6258ac601480e776c215c989cc5faae46d5ca9f7.patch"; + sha256 = "02zy4jf24qlqz9fkcs2rqg64ijd8smncmra8s5yp2mln4dmmii1k"; + } + )) (old: { + # The above patch contains a completely new spago.cabal file, but our + # source tree from Hackage already contains a cabal file. Delete the + # local cabal file and just take the one from the patch. + # + # WARNING: The empty line above the `rm` needs to be kept. + prePatch = old.prePatch or "" + '' + + rm spago.cabal + ''; + # The above patch also adds a dependency on the stringsearch package. + libraryHaskellDepends = old.libraryHaskellDepends or [] ++ [ self.stringsearch ]; }); # spago requires an older version of megaparsec, but it appears to work