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 requested review from Lassulus and Profpatsch as code owners Sep 7, 2020
@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 xaverdh commented Sep 7, 2020

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

@Lassulus
Copy link
Contributor

@Lassulus Lassulus commented Sep 8, 2020

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

@xaverdh
Copy link
Contributor Author

@xaverdh 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
17 checks passed
17 checks passed
tests tests
Details
action
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b20ec4f"; rev="b20ec4f719ed8e61781427762598b77ab3b9e70b"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@xaverdh
Copy link
Contributor Author

@xaverdh xaverdh commented Sep 8, 2020

Thanks!

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

@Profpatsch Profpatsch commented Sep 23, 2020

Ohai Xave!

@xaverdh
Copy link
Contributor Author

@xaverdh 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.