New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell.packages.ghc822/844: Fix configuration and build of GHC822/844 #55703
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't edit pkgs/development/haskell-modules/hackage-packages.nix
. Please see the comment at the very top.
8.4.4 requires < 1.8 sphinx, otherwise build fails on haddock with: Extension error: The 'ghc-flag' directive is already registered to domain std
@peti thanks, I see from @dotlambda 's suggestion how to change version/sha256 without creating new attributes in hackage-packages. I'll make the change. |
Co-Authored-By: artempyanykh <artem.pyanykh@gmail.com>
@peti looks like after all I haven't completely figured it out. A couple things:
UPD: hpack_0_31_1 builds fine, but stack fails due to build failure of one of its dependencies:
|
66f49ab
to
e159c83
Compare
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"; | ||
}); | ||
Cabal_1_24_2_0 = self.callPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of that change? I don't see what this is supposed to accomplish?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peti super.Cabal_1_24_2_0
is not a thing anymore (I guess it was in hackage_packages sometime ago, but not now). Without this change nix-env -qaP haskell.packages.ghc822
fails.
I'd simply remove this derivation, but
- the comment above says "# Make sure we can still build Cabal 1.x." 🤷♂️
- removing this derivation is a breaking change if someone depends on it and\or cares.
So, I fixed this super.Cabal_1_24_2_0
issue and adjusted prePatch
section so that Cabal successfully builds.
Does this answer your question?
P.S. If no one cares about pkgname_{version}
derivations in ghc_8.x configurations, I can just remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just drop the override. It's been broken for a long time and doubt anyone cares about Cabal 1.x any more.
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"; | ||
}); | ||
Cabal_1_24_2_0 = self.callPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just drop the override. It's been broken for a long time and doubt anyone cares about Cabal 1.x any more.
@@ -89,7 +116,24 @@ 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; }); | |||
hackage-db_2_0_1 = (self.callPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this Nix build into the overrides file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK what's the policy regarding keeping old version pinned derivations (and whether it's important to preserve them).
I assume that according to your comment about Cabal_1_x, no one cares about these, so I just removed them. Let me know if something other is desired.
hpack_0_31_1 = super.hpack_0_31_1.override { | ||
yaml = self.yaml_0_11_0_0; | ||
}; | ||
hpack_0_31_1 = self.callPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Why did you add that build expression into the overrides file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
pkgs/top-level/haskell-packages.nix
Outdated
@@ -55,7 +55,13 @@ in { | |||
}; | |||
ghc844 = callPackage ../development/compilers/ghc/8.4.4.nix { | |||
bootPkgs = packages.ghc822Binary; | |||
inherit (buildPackages.python3Packages) sphinx; | |||
sphinx = buildPackages.python3Packages.sphinx.overridePythonAttrs (oldAttrs: rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a sphinx_1_7_9 attribute into python-packages.nix
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@peti looks good? |
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.
Merged to |
Motivation for this change
nix-env -qaP -A haskell.packages.ghc8xx
for GHC822 and 844 fails with:Adding ghc-heap = null to respective configuration files leads to further failures due to missing attributes (specific version of haskell packages).
Furthermore, when all configuration problems are resolved the ghc build itself fails due to sphinx.
I'm new to nix, so if there's a way to avoid copy-paste or version-pinning, please let me know!
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)