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

rustc: Provide unpacked source tree derivation for use in tools #27026

Closed
wants to merge 1 commit into from

Conversation

corngood
Copy link
Contributor

@corngood corngood commented Jul 1, 2017

Racer doesn't function when RUST_SRC_PATH points to the source tarball.

I chose unpackedSrc instead of src to avoid any possibly breakage, but perhaps it's better to replace src? It could also be made an additional output of the rustc derivation instead.

Any thoughts?

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@mention-bot
Copy link

@corngood, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jagajaga, @globin and @LnL7 to be potential reviewers.

@corngood
Copy link
Contributor Author

corngood commented Jul 1, 2017

I'm not really happy with the unpacking derivation. It seems like something that would have existed elsewhere by now, but I couldn't find anything to share it with.

Edit: What I mean is, should there be a helper to unpack src to $out?

mkdir -p $out
cp -r . $out/
'';
phases = [ "unpackPhase" "installPhase" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Various people don't like setting phases like this. You can skip a phase by setting it to ":" (a command which does the same as the command true).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Racer doesn't function when RUST_SRC_PATH points to the source tarball.
@matthewbauer
Copy link
Member

Fixed in master.

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

Successfully merging this pull request may close these issues.

None yet

4 participants