summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2017-09-07 10:26:31 +0200
committerPeter Simons <simons@cryp.to>2017-09-07 17:41:27 +0200
commit8809e87684bf6ad2014a42b43b91f7008001aded (patch)
tree5fccd19f06b836ad32e739a165e9d9c80c94afe7 /pkgs
parente8826a9ac4856bc4f29fa4b535749d2797ad2d69 (diff)
downloadnixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar.gz
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar.bz2
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar.lz
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar.xz
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.tar.zst
nixlib-8809e87684bf6ad2014a42b43b91f7008001aded.zip
haskell-pandoc: compile ghc-8.2.x version with Cabal 1.x to avoid errors in Setup.hs
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
index a3337bbb3519..8b261112ad0e 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
@@ -36,6 +36,11 @@ self: super: {
   unix = null;
   xhtml = null;
 
+  # Make sure we can still build Cabal 1.x.
+  Cabal_1_24_2_0 = overrideCabal super.Cabal_1_24_2_0 (drv: {
+    prePatch = "sed -i -e 's/process.*< 1.5,/process,/g' Cabal.cabal";
+  });
+
   # cabal-install can use the native Cabal library.
   cabal-install = super.cabal-install.override { Cabal = null; };
 
@@ -66,6 +71,18 @@ self: super: {
   # https://github.com/aristidb/aws/issues/238
   aws = doJailbreak super.aws;
 
+  # https://github.com/jgm/pandoc/issues/3876
+  pandoc = let fixSetup = pkgs.fetchpatch {
+                            url = "https://github.com/jgm/pandoc/pull/3899.patch";
+                            sha256 = "0lk9vs2l1wc1kr0y8fkdcarfi4sjd3dl81r52n39r25xx9kqawv7";
+                          };
+           in overrideCabal super.pandoc (drv: {
+                editedCabalFile = null;
+                patches = drv.patches or [] ++ [fixSetup];
+                setupHaskellDepends = drv.setupHaskellDepends or [self.Cabal_1_24_2_0];
+                preCompileBuildDriver = "setupCompileFlags+=' -package=Cabal-1.24.2.0'";
+              });
+
   # LTS-9 versions do not compile.
   path = dontCheck super.path;
   path-io = super.path-io_1_3_3;