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

haskellPackages: apply GHC specific overrides before GHCJS #23610

Merged
merged 1 commit into from Mar 24, 2017

Conversation

ljli
Copy link
Contributor

@ljli ljli commented Mar 7, 2017

GHCJS is effectively a backend for GHC, so all the GHC version specific package set overrides should in
general apply to the GHCJS package sets, too.

Motivation for this change
Things done
  • 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 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.

@mention-bot
Copy link

@ljli, thanks for your PR! By analyzing the history of the files in this pull request, we identified @peti, @cstrahan and @Profpatsch to be potential reviewers.

compilerConfig =
extendCompose
(callPackage ../development/haskell-modules/configuration-ghcjs.nix { })
(callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { });
Copy link
Member

@peti peti Mar 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you pass the ghc-7.10.x-related overrides as packageSetConfig here? That would rectify the need for function composition.

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 noticed that packageSetConfig could be used, but I wasn't sure it was intended for this and compilerConfig sounds more fitting than packageSetConfig. Alternatively we could introduce a new argument compilerBackendConfig or make the *Config arguments take lists of configs. Anyway I'm gonna update the PR according to your suggestion.

@@ -15,6 +15,8 @@ let # These are attributes in compiler and packages that don't support integer-s
"uhc"
"integer-simple"
];
extendCompose = a: b: self: super: let super' = b self super; in super' // a self (super // super');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function belongs into lib/trivial.nix.

GHCJS is effectively a backend for GHC, so all the GHC version specific package set overrides should in
general apply to the GHCJS package sets, too.
@ljli
Copy link
Contributor Author

ljli commented Mar 24, 2017

I updated the PR, are we good?

@peti peti merged commit 24a6928 into NixOS:master Mar 24, 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

3 participants