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

pkgs/build-support/writers: allow passing ghc arguments in writeHaskell #97380

Merged
merged 1 commit into from Sep 8, 2020

Conversation

xaverdh
Copy link
Contributor

@xaverdh xaverdh commented Sep 7, 2020

Motivation for this change

I would like to pass additional arguments to the ghc invocation in writeHaskell.
I have some personal use cases but would also like to use this new power to add a similar option to the xmonad module, which also uses writeHaskell.

Things done

Tested locally

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@xaverdh xaverdh changed the title <!-- To help with the large amounts of pull requests, we would appreciate your reviews of other pull requests, especially simple package updates. Just leave a comment describing what you have tested in the relevant package/service. Reviewing helps to reduce the average time-to-merge for everyone. Thanks a lot if you do! List of open PRs: https://github.com/NixOS/nixpkgs/pulls Reviewing guidelines: https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions --> pkgs/build-support/writers: allow passing ghc arguments in writeHaskell Sep 7, 2020
@xaverdh
Copy link
Contributor Author

xaverdh commented Sep 7, 2020

Side remark: hub pull-request should really be taught to deal better with interrupts..

@Lassulus
Copy link
Member

Lassulus commented Sep 8, 2020

sounds cool. whats you usecase? do you have an example?

@xaverdh
Copy link
Contributor Author

xaverdh commented Sep 8, 2020

sounds cool. whats you usecase? do you have an example?

  • compiling with threaded runtime; unfortunately "-threaded" is still not the default, which can lead to problems with blocking ffi calls.
  • setting -O levels, e.g. for xmonad (default is no optimization, which is good for compile time, but bad otherwise)
  • setting RTS options and other experimental stuff

@Lassulus Lassulus merged commit a1e9d94 into NixOS:master Sep 8, 2020
@xaverdh
Copy link
Contributor Author

xaverdh commented Sep 8, 2020

Thanks!

@xaverdh xaverdh deleted the write-haskell-ghc-args branch September 8, 2020 14:44
@Profpatsch
Copy link
Member

Ohai Xave!

@xaverdh
Copy link
Contributor Author

xaverdh commented Sep 23, 2020

Ohai Xave!

Hey 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants