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

Build GHC without GMP integer library #5493

Closed
k0ral opened this issue Dec 28, 2014 · 6 comments
Closed

Build GHC without GMP integer library #5493

k0ral opened this issue Dec 28, 2014 · 6 comments

Comments

@k0ral
Copy link
Contributor

k0ral commented Dec 28, 2014

I didn't find a way to build/install GHC without GMP with current nixpkgs. It boils down to adding INTEGER_LIBRARY = integer-simple in the build.mk file.

I'm willing to contribute, if this is indeed missing, but given that the haskell-related derivations are organized in a specific and well-thought manner, I figured I should ask for pointers before naively stepping in the wrong direction.

At first glance, I would do the following:

  • patch development/compilers/ghc/X.Y.Z.nix derivations to accept a new useIntegerSimple flag as input;
  • use the extraArgs of packagesFun (from haskell-defaults.nix) to forward this flag if needed.

What do you think ?

@peti
Copy link
Member

peti commented Dec 28, 2014

Note that the Haskell package set structure is going to become much simpler in the future: https://github.com/peti/nixpkgs/blob/haskell-ng/pkgs/top-level/all-packages.nix#L3350.

I guess, it would be nice to have a generic buildmk argument to GHC that people can use to pass arbitrary settings to the build. I'll try to figure something out.

@k0ral
Copy link
Contributor Author

k0ral commented Dec 28, 2014

This is really nice, I'm looking forward to it, thank you.

@puffnfresh
Copy link
Contributor

@peti the buildInputs need to change to use integer-simple instead of integer-gmp for the derivations. There's usually also flags such as -finteger-simple or -fuse-integer-simple which need to be used to toggle the dependencies. Not sure if hackage2nix can handle that, but would be good if we could make the derivations be parameterised with what the .cabal files has in conditionals.

@peti
Copy link
Member

peti commented May 29, 2015

We probably don't have to worry about the Cabal flags as those are auto-detected at compile time based on the available build environment. Dependencies on integer-gmp are no problem, I suppose, because that name is defined as null anyway since it's a core library. I believe the changes mostly comes down to extending the GHC options to support that particular build variant.

Personally, I'd love a generic mechanism for our GHC builds that can be used to pass an arbitrary build.mk file so that people can build GHC with any option they please.

@Profpatsch
Copy link
Member

(triage) can we close this @peti?

@peti
Copy link
Member

peti commented Jan 31, 2017

#22121 will remedy this issue once it's merged.

@vcunat vcunat closed this as completed in dfcc9e2 Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants