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.
This commit is contained in:
Artem Pyanykh 2019-02-13 15:28:10 +03:00 committed by Peter Simons
parent cab4a718de
commit f7003e5390
4 changed files with 13 additions and 12 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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;
};

View File

@ -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 { };