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

rust-overlay: rust-src fails on latest nightly #183

Closed
dnaq opened this issue Jun 30, 2019 · 4 comments
Closed

rust-overlay: rust-src fails on latest nightly #183

dnaq opened this issue Jun 30, 2019 · 4 comments

Comments

@dnaq
Copy link
Contributor

dnaq commented Jun 30, 2019

The following simplified nixos configuration:

environment.systemPackages = [
  let rust = latest.rustChannels.nightly.rust.override {
    extensions = [ "rust-src" ];
  };
  in rust
  ]

yields this error, since approximately yesterday:

building '/nix/store/7w6pfmmkirm0rhww6qimzvy0nmf0j06z-rust-src.drv'...
unpacking sources
unpacking source archive /nix/store/ma4hv9dgf0kd4ahbcc6ikm7jrzb1j0rw-rust-src-nightly.tar.xz
source root is rust-src-nightly
setting SOURCE_DATE_EPOCH to timestamp 1561817711 of file rust-src-nightly/rust-src/manifest.in
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
patching script interpreter paths in install.sh
/nix/store/mmy628bwa67s49afik1pm4niab56h280-stdenv-linux/setup: ./install.sh: /bin/bash^M: bad interpreter: No such file or directory
builder for '/nix/store/7w6pfmmkirm0rhww6qimzvy0nmf0j06z-rust-src.drv' failed with exit code 126
cannot build derivation '/nix/store/rphq41zxgagbii159khfcmsnsljf08hr-rust-1.37.0-nightly-2019-06-29-9a90d03ad.drv': 1 dependencies couldn't be built
@nbp
Copy link
Collaborator

nbp commented Jul 1, 2019

For reference, here is the failing line: https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix#L149 .
This would be an issue to address either as part of the generation of the install.sh script provided and/or as part of the patchShebang function provided by Nixpkgs

@arcnmx
Copy link

arcnmx commented Jul 1, 2019

This seems like an upstream issue though not sure where or why, probably it's suddenly running on windows now? There's probably no reason to work around it in the overlay, it's not like this is working anywhere else either. Unfortunately rustup presumably doesn't use that script, so the breakage isn't obvious to most nightly users...

@dnaq
Copy link
Contributor Author

dnaq commented Jul 2, 2019

We can work around this issue by adding:
${self.dos2unix}/bin/dos2unix install.sh

At the beginning of installPhase, line 148, in the overlay.

dnaq added a commit to dnaq/nixpkgs-mozilla that referenced this issue Jul 9, 2019
See mozilla#183. Calls dos2unix on the installer script before installing it.
@nbp
Copy link
Collaborator

nbp commented Jul 24, 2019

This seems to have been fixed upstream: rust-lang/rust#62276

@nbp nbp closed this as completed Jul 24, 2019
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

No branches or pull requests

3 participants