From f7003e5390caa75b77feca066a576b34f986d1c5 Mon Sep 17 00:00:00 2001 From: Artem Pyanykh Date: Wed, 13 Feb 2019 15:28:10 +0300 Subject: [PATCH] ghc-8.4.4: use sphinx 1.7.x to build the documentation ghc-8.4.4 requires sphinx < 1.8, otherwise build fails on haddock with: Extension error: The 'ghc-flag' directive is already registered to domain std Also fixed evaluation errors in configurations of ghc-8.2.x and ghc-8.4.x. Closes https://github.com/NixOS/nixpkgs/pull/55703. --- .../haskell-modules/configuration-ghc-8.2.x.nix | 7 +------ .../haskell-modules/configuration-ghc-8.4.x.nix | 7 ++----- pkgs/top-level/haskell-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 9 +++++++++ 4 files changed, 13 insertions(+), 12 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 58e84b154856..de01fe4cd120 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix @@ -20,6 +20,7 @@ self: super: { ghc-boot = null; ghc-boot-th = null; ghc-compact = null; + ghc-heap = null; ghc-prim = null; ghci = null; haskeline = null; @@ -42,11 +43,6 @@ self: super: { stm = self.stm_2_5_0_0; text = self.text_1_2_3_1; - # 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"; - }); - # Build with the latest Cabal version, which works best albeit not perfectly. jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_2_2_0_1; }; @@ -89,7 +85,6 @@ self: super: { cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; }); cabal2spec = super.cabal2spec.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; }); distribution-nixpkgs = super.distribution-nixpkgs.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; }); - hackage-db_2_0_1 = super.hackage-db_2_0_1.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; }); stack = super.stack.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; }); # Older GHC versions need these additional dependencies. diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix index 417bf0effcd9..4e953b7b6af4 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix @@ -20,6 +20,7 @@ self: super: { ghc-boot = null; ghc-boot-th = null; ghc-compact = null; + ghc-heap = null; ghc-prim = null; ghci = null; haskeline = null; @@ -63,13 +64,9 @@ self: super: { # more verbose but friendlier for Hydra. stack = (doJailbreak super.stack).override { Cabal = self.Cabal_2_4_1_0; - hpack = self.hpack_0_31_1.override { Cabal = self.Cabal_2_4_1_0; }; - yaml = self.yaml_0_11_0_0; + hpack = self.hpack.override { Cabal = self.Cabal_2_4_1_0; }; hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_1_0; }; }; - hpack_0_31_1 = super.hpack_0_31_1.override { - yaml = self.yaml_0_11_0_0; - }; # Older GHC versions need these additional dependencies. aeson = addBuildDepend super.aeson self.contravariant; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 3e59bf872d53..a2f392fb1095 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -55,7 +55,7 @@ in { }; ghc844 = callPackage ../development/compilers/ghc/8.4.4.nix { bootPkgs = packages.ghc822Binary; - sphinx = null; # broken with sphinx 1.8.x + sphinx = buildPackages.python3Packages.sphinx_1_7_9; buildLlvmPackages = buildPackages.llvmPackages_5; llvmPackages = pkgs.llvmPackages_5; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2879cf8432a0..0e7ffac4019d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4130,6 +4130,15 @@ in { sphinx = callPackage ../development/python-modules/sphinx { }; + sphinx_1_7_9 = (callPackage ../development/python-modules/sphinx { }) + .overridePythonAttrs (oldAttrs: rec { + version = "1.7.9"; + src = oldAttrs.src.override { + inherit version; + sha256 = "217a7705adcb573da5bbe1e0f5cab4fa0bd89fd9342c9159121746f593c2d5a4"; + }; + }); + sphinx-argparse = callPackage ../development/python-modules/sphinx-argparse { }; sphinxcontrib-websupport = callPackage ../development/python-modules/sphinxcontrib-websupport { };