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

buildRustPackage fails with recent nightly Cargo #61618

Closed
lostman opened this issue May 17, 2019 · 4 comments
Closed

buildRustPackage fails with recent nightly Cargo #61618

lostman opened this issue May 17, 2019 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: rust

Comments

@lostman
Copy link
Contributor

lostman commented May 17, 2019

Issue description

buildRustPackage with rustChannelOf { channel = "nightly"; date = "2019-05-07"; } succeeds while date = "2019-05-08" (and later) fails:

error: failed to acquire package cache lock

Caused by:
  failed to open: /homeless-shelter/.cargo/.package-cache

Steps to reproduce

{ mozilla ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/50bae918794d3c283aeb335b209efd71e75e3954.tar.gz)
, pkgs ?  import <nixpkgs> { overlays = [ mozilla ]; }
}:

let
  nightlyRustPlatform =
    let
      nightly = pkgs.rustChannelOf {
        date = "2019-05-08";
        channel = "nightly";
      };
    in
    pkgs.makeRustPlatform {
      rustc = nightly.rust;
      cargo = nightly.rust;
    };
in

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.42, NixOS, 19.03.172604.7cd2e4ebe8c (Koi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - channels(root): `"nixos-19.03.172604.7cd2e4ebe8c,
   nixos-unstable-19.09pre179307.bc94dcf5002"`
 - channels(mw): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@layus
Copy link
Member

layus commented Jun 6, 2019

Should have been fixed by rust-lang/cargo#6940, but it seems to be only a partial fix, as /homeless-shelter/.cargo/.package-cache is still looked up.

@layus
Copy link
Member

layus commented Jun 6, 2019

I have temporarilly patched the issue by adding this inside buildRustPackage.

+  preConfigure = ''
+    export HOME=`mktemp -d`
+  '';
+

If it appears that cargo will always need a HOME, and that it cannot be forced to work without it, then this patch could go inside buildRustPackage definition.

@nmattia
Copy link
Contributor

nmattia commented Jun 22, 2019

Looks like a duplicate of #61192

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
sbellem added a commit to sbellem/nix-sgx-sdk that referenced this issue Feb 12, 2022
problem: homeless-shelter or github.com unreachable

see:

* NixOS/nixpkgs#61192
* NixOS/nixpkgs#61618
@lostman lostman closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: rust
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants