summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-common.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-22 22:39:15 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-22 23:47:25 +0100
commit1bd9bbc335b986e13b26f89f0e629f41bb91eb2e (patch)
treee7512ce3454f5bbf85803b424c900c980b074b27 /pkgs/development/haskell-modules/configuration-common.nix
parentcf5345e6961872385fc37c084b5d2edecb472ab9 (diff)
downloadnixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar.gz
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar.bz2
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar.lz
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar.xz
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.tar.zst
nixpkgs-1bd9bbc335b986e13b26f89f0e629f41bb91eb2e.zip
haskellPackages.idris: unbreak by applying patches from master
We need to fix two compilation errors caused by breaking changes in
dependencies of idris 1.3.3:

* haskeline >= 0.8
* megaparsec >= 0.9

For both there is a patch on idris master which we can just apply. Both
can presumably removed as soon as the next release of idris 1 hits.

Co-authored-by: Jake Gillberg <jake.gillberg@protonmail.com>
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix22
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 2f3ea3a4533..372d0c8e5c3 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -684,8 +684,26 @@ self: super: {
     '';
   });
 
-  # The standard libraries are compiled separately.
-  idris = generateOptparseApplicativeCompletion "idris" (dontCheck super.idris);
+  # * The standard libraries are compiled separately.
+  # * We need multiple patches from master to fix compilation with
+  #   updated dependencies (haskeline and megaparsec) which can be
+  #   removed when the next idris release (1.3.4 probably) comes
+  #   around.
+  idris = generateOptparseApplicativeCompletion "idris"
+    (doJailbreak (dontCheck
+      (appendPatches super.idris [
+        # compatibility with haskeline >= 0.8
+        (pkgs.fetchpatch {
+          url = "https://github.com/idris-lang/Idris-dev/commit/89a87cf666eb8b27190c779e72d0d76eadc1bc14.patch";
+          sha256 = "0fv493zlpgjsf57w0sncd4vqfkabfczp3xazjjmqw54m9rsfix35";
+        })
+        # compatibility with megaparsec >= 0.9
+        (pkgs.fetchpatch {
+          url = "https://github.com/idris-lang/Idris-dev/commit/6ea9bc913877d765048d7cdb7fc5aec60b196fac.patch";
+          sha256 = "0yms74d1xdxd1c08dnp45nb1ddzq54n6hqgzxx0r494wy614ir8q";
+        })
+      ])
+    ));
 
   # https://github.com/pontarius/pontarius-xmpp/issues/105
   pontarius-xmpp = dontCheck super.pontarius-xmpp;