about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2020-02-29 11:10:19 +0100
committerPeter Simons <simons@cryp.to>2020-02-29 11:10:19 +0100
commit376ff258b5a8605ed1d177a389463e808fe8a436 (patch)
treee7cac34aa0f9458ed1781a6374ef6c9619e7e3d1
parenta6130f1848c6fd5ba0379f8ccf934043d1a6e9dc (diff)
downloadnixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar.gz
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar.bz2
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar.lz
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar.xz
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.tar.zst
nixlib-376ff258b5a8605ed1d177a389463e808fe8a436.zip
stylish-cabal: fix the build
We can still compile the package with ghc-8.6.5. Later
compiler versions don't work, unfortunately.
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix4
-rw-r--r--pkgs/development/haskell-modules/configuration-hackage2nix.yaml1
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix24
-rw-r--r--pkgs/top-level/all-packages.nix4
4 files changed, 31 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
index 8d64286402f3..915f7b3e635f 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
@@ -87,4 +87,8 @@ self: super: {
   # Builds only with ghc-8.8.x and beyond.
   policeman = markBroken super.policeman;
 
+  # https://github.com/pikajude/stylish-cabal/issues/12
+  stylish-cabal = doDistribute (markUnbroken (super.stylish-cabal.override { haddock-library = self.haddock-library_1_7_0; }));
+  haddock-library_1_7_0 = dontCheck super.haddock-library_1_7_0;
+
 }
diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
index c8215c57533d..42223a656f80 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
@@ -2367,6 +2367,7 @@ extra-packages:
   - gloss < 1.9.3                       # new versions don't compile with GHC 7.8.x
   - haddock == 2.22.*                   # required on GHC 8.0.x
   - haddock-api == 2.22.*               # required on GHC 7.8.x
+  - haddock-library ==1.7.*             # required by stylish-cabal-0.5.0.0
   - happy <1.19.6                       # newer versions break Agda
   - happy == 1.19.9                     # for purescript
   - haskell-gi-overloading == 0.0       # gi-* packages use this dependency to disable overloading support
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 7425f9e784d7..59eb91b774ed 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -107228,6 +107228,27 @@ self: {
        broken = true;
      }) {};
 
+  "haddock-library_1_7_0" = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, containers, deepseq
+     , hspec, hspec-discover, parsec, QuickCheck, text, transformers
+     }:
+     mkDerivation {
+       pname = "haddock-library";
+       version = "1.7.0";
+       sha256 = "04fhcjk0pvsaqvsgp2w06cv2qvshq1xs1bwc157q4lmkgr57khp7";
+       libraryHaskellDepends = [
+         base bytestring containers parsec text transformers
+       ];
+       testHaskellDepends = [
+         base base-compat bytestring containers deepseq hspec parsec
+         QuickCheck text transformers
+       ];
+       testToolDepends = [ hspec-discover ];
+       description = "Library exposing some functionality of Haddock";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "haddock-library" = callPackage
     ({ mkDerivation, base, base-compat, bytestring, containers, deepseq
      , directory, filepath, hspec, hspec-discover, optparse-applicative
@@ -231440,7 +231461,8 @@ self: {
        doHaddock = false;
        description = "Format Cabal files";
        license = stdenv.lib.licenses.bsd3;
-       maintainers = with stdenv.lib.maintainers; [ peti ];
+       hydraPlatforms = stdenv.lib.platforms.none;
+       broken = true;
      }) {};
 
   "stylish-haskell" = callPackage
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d00b878c7816..b40eb6db6b5c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8292,7 +8292,9 @@ in
 
   stack = haskell.lib.justStaticExecutables haskellPackages.stack;
   hlint = haskell.lib.justStaticExecutables haskellPackages.hlint;
-  stylish-cabal = haskell.lib.justStaticExecutables haskellPackages.stylish-cabal;
+
+  # We use a version built with an older compiler because of https://github.com/pikajude/stylish-cabal/issues/12.
+  stylish-cabal = haskell.lib.justStaticExecutables haskell.packages.ghc865.stylish-cabal;
 
   all-cabal-hashes = callPackage ../data/misc/hackage { };