Skip to content
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

Merged
merged 3 commits into from
Aug 10, 2017
Merged

GHC Head updates #28044

merged 3 commits into from
Aug 10, 2017

Conversation

mpickering
Copy link
Contributor

@mpickering mpickering commented Aug 8, 2017

Motivation for this change
Things done

Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

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.
@mention-bot
Copy link

@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"
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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";
              };}); 

Copy link
Contributor

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 😄

Copy link
Member

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...

@mpickering
Copy link
Contributor Author

The build seems to work correctly with these changes.

@domenkozar domenkozar merged commit ff5fd11 into NixOS:master Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants