Skip to content

Commit

Permalink
ghc-8.4.4: use sphinx 1.7.x to build the documentation
Browse files Browse the repository at this point in the history
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 #55703.
  • Loading branch information
artempyanykh authored and peti committed Feb 27, 2019
1 parent 8913ba2 commit a251d91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 1 addition & 6 deletions pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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; };

Expand Down Expand Up @@ -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.
Expand Down
7 changes: 2 additions & 5 deletions pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
9 changes: 9 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit a251d91

Please sign in to comment.