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

purescript: fix purescript derivation using easy-purescript-nix #57927

Merged
merged 6 commits into from Mar 20, 2019

Conversation

justinwoo
Copy link
Member

@justinwoo justinwoo commented Mar 19, 2019

Motivation for this change

For the past couple of years, there has continued to be problems with having the PureScript compiler on nixpkgs building from Haskell packages it is not built against in its actual development and release. We have seen this issue come up multiple times here on nixpkgs, but this also causes numerous issues to be filed against the PureScript compiler repository. One example of an exchange that has occurred multiple times in the past: #53597 purescript/purescript#3571. As noted, the PureScript compiler is not on Stackage because it is not meant to be used as a library, and it does not update itself to the latest LTS and cut releases to match LTS releases.

Instead, I have begun maintaining my own derivation for the PureScript compiler (among other tools) in a small project here: https://github.com/justinwoo/easy-purescript-nix. Within are other reference and derivations for other tools commonly used in the PureScript ecosystem, updated to their respective newest releases. These derivations use the same releases that other Linux and OSX users use, along with the standard application of patchELF to provide for runtime dependencies such as zlib, gmp, and ncurses5. These derivations are now used by a variety of NixOS, non-NixOS Linux, and OSX users.

This commit then consumes the easy-purescript-nix derivation for the PureScript compiler and provides it in all-packages for consumption.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

For the past couple of years, there has continued to be problems with having the PureScript compiler on nixpkgs building from Haskell packages it is not built against in its actual development and release. We have seen this issue come up multiple times here on nixpkgs, but this also causes numerous issues to be filed against the PureScript compiler repository. One example of an exchange that has occurred multiple times in the past: NixOS#53597 purescript/purescript#3571. As noted, the PureScript compiler is not on Stackage because it is not meant to be used as a library, and it does not update itself to the latest LTS and cut releases to match LTS releases.

Instead, I have begun maintaining my own derivation for the PureScript compiler (among other tools) in a small project here: https://github.com/justinwoo/easy-purescript-nix. Within are other reference and derivations for other tools commonly used in the PureScript ecosystem, updated to their respective newest releases. These derivations use the same releases that other Linux and OSX users use, along with the standard application of patchELF to provide for runtime dependencies such as zlib, gmp, and ncurses5. These derivations are now used by a variety of NixOS, non-NixOS Linux, and OSX users.

This commit then consumes the easy-purescript-nix derivation for the PureScript compiler and provides it in all-packages for consumption.
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

Thank you so much! I left quite a bit of suggested changes, but really they were almost entirely dropping pkgs. off dependencies.

The code looks good. The formatting is not quite consistent with the rest of nixpkgs, but it isn't a very long package and the formatting isn't bad.

Thank you for the second commit you already made -- inlining the expression, that definitely is important for inclusion as we don't support importing code which we fetched.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
Co-Authored-By: justinwoo <moomoowoo@gmail.com>
Co-Authored-By: justinwoo <moomoowoo@gmail.com>
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

I messed up a couple of my suggested changes. Hopefully this makes them right.

justinwoo and others added 2 commits March 20, 2019 15:54
@grahamc
Copy link
Member

grahamc commented Mar 20, 2019

OK Looks like we have a slight backlog in our build queue but:

@GrahamcOfBorg build purescript

@justinwoo
Copy link
Member Author

Looks like everything went through except for the unsupported aarch64

@grahamc
Copy link
Member

grahamc commented Mar 20, 2019

Thank you!

@grahamc grahamc merged commit 5c9b1c3 into NixOS:master Mar 20, 2019
@justinwoo
Copy link
Member Author

Thanks!!

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