diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-04-29 15:27:02 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2022-04-29 15:27:02 +0200 |
commit | 813f8b5efbc827bf39416120b8a651cc1a2df8c5 (patch) | |
tree | 4834b0c008578fea557c828a10edf3ae089cf5ff | |
parent | c2fe259aa6d2254b25853f4cafdf1567e7329bba (diff) | |
download | nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar.gz nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar.bz2 nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar.lz nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar.xz nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.tar.zst nixpkgs-813f8b5efbc827bf39416120b8a651cc1a2df8c5.zip |
haskellPackages: xhtml is not bundled if haddock is disabled
The xhtml library is only built as part of the GHC build process if GHC is disabled. This means that no GHC cross compiler has xhtml bundled, since haddock can't be built if GHC is a cross compiler (see relevant notes in the GHC nix expressions). This means that all packages depending on xhtml would currently fail to build when cross-compiled, as haskellPackages would assume it'd be provided by GHC. This is fixed by this commit. pkgsStatic hits this case, so we test compilation of xhtml for these package sets which will remind us to update the attribute name whenever its version changes.
7 files changed, 20 insertions, 6 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index c8e7c8179e6..48972849cf6 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -43,7 +43,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # cabal-install needs more recent versions of Cabal and base16-bytestring. cabal-install = super.cabal-install.overrideScope (self: super: { 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 5eaa1ae413d..11c3677913e 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix @@ -42,7 +42,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # Needs Cabal 3.0.x. cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; }); diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix index 98eaab70731..d7b049b205b 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -42,7 +42,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # GHC 8.8.x can build haddock version 2.23.* haddock = self.haddock_2_23_1; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index 855afa28101..db38ebd8b70 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -44,7 +44,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # cabal-install needs more recent versions of Cabal and base16-bytestring. cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: { diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix index 249816cc49c..00c1698b6a0 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -44,7 +44,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # Tests fail because of typechecking changes conduit = dontCheck super.conduit; diff --git a/pkgs/development/haskell-modules/configuration-ghc-head.nix b/pkgs/development/haskell-modules/configuration-ghc-head.nix index bc65e209911..ad3aea047ae 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-head.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-head.nix @@ -52,7 +52,9 @@ self: super: { time = null; transformers = null; unix = null; - xhtml = null; + # GHC only bundles the xhtml library if haddock is enabled, check if this is + # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 + xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1; # https://github.com/tibbe/unordered-containers/issues/214 unordered-containers = dontCheck super.unordered-containers; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 88b53f6b636..a1e72c90bea 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -317,6 +317,7 @@ let random QuickCheck cabal2nix + xhtml # isn't bundled for cross ; }; @@ -327,6 +328,7 @@ let random QuickCheck cabal2nix + xhtml # isn't bundled for cross ; }; }; |