-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
GHC Head updates #28044
GHC Head updates #28044
Conversation
If you want to override the source but the major version changes (ie 8.1 -> 8.3) then you also have to modify the version. Otherwise the build will fail with difficult to understand errors, making version a parameter makes it easy to override.
@mpickering, thanks for your PR! By analyzing the history of the files in this pull request, we identified @basvandijk, @shlevy and @kosmikus to be potential reviewers. |
@@ -5,15 +5,15 @@ | |||
# If enabled GHC will be build with the GPL-free but slower integer-simple | |||
# library instead of the faster but GPLed integer-gmp library. | |||
, enableIntegerSimple ? false, gmp | |||
, version ? "8.3.20170808" |
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.
Allowing to override the version number but not the actual version that’s used, i.e., src
seems a bit weird.
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.
I could override src
with overrideDerivation
but if I remember right, I couldn't do the same for version
.
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.
This is how it ended up looking.
ghcWithVersion = pkgs.haskell.compiler.ghcHEAD.override { version = "8.3.20170726"; };
ghcVersion = pkgs.stdenv.lib.overrideDerivation ghcWithVersion (oldAttrs : {
name = "ghc-8.3.20170726";
src = pkgs.fetchgit {
url = "git://git.haskell.org/ghc.git";
rev = "1a9aae88ec8f57393db4992748a7de08c54cfe61";
sha256 = "06cjx9b8igmz9dh5zqfnpxy4ycq2wgbrayg9jnwvj1a08qbkzgd8";
};});
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.
Ah that might very well be the case, in that case ignore me 😄
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.
I wish there was a way for mkDerivation to take a fixed point...
The build seems to work correctly with these changes. |
Motivation for this change
Things done
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)