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

idris2: Enable --install, bugfixes #95776

Merged
merged 1 commit into from Aug 21, 2020
Merged

Conversation

wchresta
Copy link
Member

Motivation for this change

This removes the need of the bin/idris2_app folder
and replaces it with proper links to the nix-storage folders
This also allows the user to override IDRIS2_PREFIX which
will allow them to use --install to install packages.

Example of how directories are created by the wrapper when user changes the prefix:

$ IDRIS2_PREFIX=~/.idris2 idris2 --paths
+ Working Directory      :: "/home/wchresta/src/nixpkgs"
+ Source Directory       :: Nothing
+ Build Directory        :: "build"
+ Output Directory       :: "build/exec"
+ Installation Prefix    :: "/home/wchresta/.idris2"
+ Extra Directories      :: [".", "/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/base", "/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/contrib", "/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/network", "/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/prelude", "/home/wchresta/.idris2/idris2-0.2.1/prelude", "/home/wchresta/.idris2/idris2-0.2.1/base"]
+ CG Library Directories :: ["/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/lib", "/home/wchresta/.idris2/idris2-0.2.1/lib", "/home/wchresta/src/nixpkgs"]
+ Data Directories       :: ["/nix/store/h4851cakq6w4cw3hcy2c65b87l80br96-idris2/idris2-0.2.1/support", "/home/wchresta/.idris2/idris2-0.2.1/support"]

Things done
  • Fix: idris2_app/ was exposed in bin/
  • Remove native Idris2 wrapper that set LD_LIBRARY_PATH
  • Improve new Idris2 wrapper to set Idris2 paths to out folders
  • 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.

@wchresta
Copy link
Member Author

@GrahamcOfBorg build idris2

Copy link
Member

@bcdarwin bcdarwin left a comment

Choose a reason for hiding this comment

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

I didn't try installing any Idris libraries, but otherwise this looks OK to me.

pkgs/development/compilers/idris2/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/idris2/default.nix Outdated Show resolved Hide resolved
@bcdarwin
Copy link
Member

nixpkgs-review succeeds:

https://github.com/NixOS/nixpkgs/pull/95776
1 package built:
idris2

@wchresta
Copy link
Member Author

I think we're ready to merge here.

pinging @veprbl and @Lassulus (as they've merged previous idris2 PRs)

pkgs/development/compilers/idris2/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/idris2/default.nix Show resolved Hide resolved
pkgs/development/compilers/idris2/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/idris2/default.nix Outdated Show resolved Hide resolved
This removes the need of the bin/idris2_app folder and replaces
it with proper links to the nix-storage folders.
This allows the user to override IDRIS2_PREFIX which will allow
them to use --install to install libraries.

* Fix: idris2_app/ was exposed in bin/
* Remove native Idris2 wrapper that set LD_LIBRARY_PATH
* Improve new Idris2 wrapper to set Idris2 paths to out folders
@Lassulus Lassulus merged commit a81c1d1 into NixOS:master Aug 21, 2020
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

4 participants