Skip to content

[haskell-updates] haskellPackages: xhtml is not bundled if haddock is disabled#170908

Merged
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:reflect-xhtml-missing
May 2, 2022
Merged

[haskell-updates] haskellPackages: xhtml is not bundled if haddock is disabled#170908
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:reflect-xhtml-missing

Conversation

@sternenseemann
Copy link
Member

@sternenseemann sternenseemann commented Apr 29, 2022

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.

See also:
https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463

There seems to be no good way to force GHC to build xhtml which may be interesting,
but I've asked in the ghc IRC channel, maybe it turns up something useful. In any case
this is a very simple fix that requires no rebuilds.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Apr 29, 2022
@sternenseemann sternenseemann marked this pull request as draft April 29, 2022 13:21
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.
@sternenseemann sternenseemann marked this pull request as ready for review April 29, 2022 13:29
@sternenseemann sternenseemann force-pushed the reflect-xhtml-missing branch from 5fd7ed1 to 813f8b5 Compare April 29, 2022 13:29
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 29, 2022
@sternenseemann
Copy link
Member Author

cc @rnhmjoj @nh2

@sternenseemann
Copy link
Member Author

@ofborg build pkgsStatic.haskellPackages.recaptcha

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Apr 30, 2022

I wasn't aware of this problem: I tested some of the packages and it does solve the issue.
Thank you for the ping.

@sternenseemann sternenseemann merged commit 9544618 into NixOS:haskell-updates May 2, 2022
@sternenseemann sternenseemann deleted the reflect-xhtml-missing branch May 2, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants