Open FintanH opened 4 years ago
@matthewbauer: do you think it could be to do with this commit? https://github.com/mozilla/nixpkgs-mozilla/commit/efda5b357451dbb0431f983cca679ae3cd9b9829 :eyes:
Also, hey again :grin:
I'm able to work around it for now by pointing to https://github.com/mozilla/nixpkgs-mozilla/commit/4521bc61c2332f41e18664812a808294c8c78580 instead of master
.
Hey! Sorry about that. It looks like toRustTarget was added only in 20.03, so many users won't have it.
It's easiest to just provide a backup in this case, so done in:
Hmmm weird... I'm on 20.03 as far as I'm aware (still getting used to the nix ecosystem). But glad you have a fix for pre-20.03 too :raised_hands:
It also seems like the combination of efda5b3 and this fix the problems I was having with cargo doc in #223.
I'm running master of nixpkgs and I still hit this error. I have to roll back to July 14.
tim@sirius ~/s/nixpkgs> jq '."nixpkgs"|{ branch, sha256}' <nix/sources.json
{
"branch": "master",
"sha256": "0lb5hh2fscvkdb30mbslqlwwxqvgc6a6bmk2aj6aj0sp49fky18n"
}
tim@sirius ~/s/nixpkgs> jq '."nixpkgs-mozilla"|{ branch, sha256}' <nix/sources.json
{
"branch": "master",
"sha256": "11wqrg86g3qva67vnk81ynvqyfj0zxk83cbrf0p9hsvxiwxs8469"
}
tim@sirius ~/s/nixpkgs> nix-env -f ./. -iA desktop --show-trace
replacing old 'desktop'
installing 'desktop'
error: while evaluating the attribute 'passAsFile' of the derivation 'desktop' at /nix/store/ymajliyf22m3fcvmqdmlpij6grjrjl7s-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating the attribute 'buildInputs' of the derivation 'crate-cargo2nix-0.8.3' at /nix/store/j5x5vsdmsi1r63xzqlb7mf42rxfb966r-cargo2nix-src/overlay/mkcrate.nix:99:5:
while evaluating the attribute 'buildInputs' of the derivation 'crate-cargo-0.41.0' at /nix/store/j5x5vsdmsi1r63xzqlb7mf42rxfb966r-cargo2nix-src/overlay/mkcrate.nix:99:5:
while evaluating the attribute 'buildInputs' of the derivation 'crate-atty-0.2.13' at /nix/store/j5x5vsdmsi1r63xzqlb7mf42rxfb966r-cargo2nix-src/overlay/mkcrate.nix:99:5:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'crate-libc-0.2.65' at /nix/store/j5x5vsdmsi1r63xzqlb7mf42rxfb966r-cargo2nix-src/overlay/mkcrate.nix:99:5:
while evaluating the attribute 'paths' of the derivation 'cargo-0.38.0-2019-08-02-9edd08916' at /nix/store/zdrn0r93cyds8spjfx9his52ksqj6rv7-source/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'installComponents' at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:134:31, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:269:24:
while evaluating 'getComponents' at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:116:81, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:268:26:
while evaluating 'flatten' at /nix/store/zdrn0r93cyds8spjfx9his52ksqj6rv7-source/lib/lists.nix:124:13, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:123:19:
while evaluating 'getTargetPkgTuples' at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:84:64, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:123:28:
while evaluating 'getTuples' at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:76:27, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:91:17:
while evaluating anonymous function at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:77:71, called from undefined position:
while evaluating 'hasTarget' at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:73:30, called from /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:77:79:
while evaluating the attribute 'rust.toRustTarget' at /nix/store/zdrn0r93cyds8spjfx9his52ksqj6rv7-source/pkgs/top-level/all-packages.nix:8184:3:
attribute 'toRustTarget' missing, at /nix/store/xcwy5w0b8b1kvnccjw5472lggr3kglq5-nixpkgs-mozilla-src/rust-overlay.nix:122:28
tim@sirius ~/s/nixpkgs>
Rolling back to July 14 worked great. I will hold here until the problem is fixed.
same here, I had to niv add mozilla/nixpkgs-mozilla -a rev=18cd4300e9bf61c7b8b372f07af827f6ddc835bb
I am running 20.03, it definitely has rust.toRustTarget
, yet I am still getting this error. Interestingly enough, going back to before July 14 didn't work for me as it worked for @dysinger (hey Tim). I am stuck at this point.
Ok. It seems to come up when you mix packages from the overlay and from not the overlay. For example, if I do this
rustc = super.latest.rustChannels.stable.rust;
inherit (super.latest.rustChannels.stable) cargo rust rust-fmt rust-std clippy;
Any included in the shell that is not explicitly in that list causes problems. However, if I change it to
rustc = super.latest.rustChannels.stable.rust;
inherit (super.latest.rustChannels.stable);
things work just fine. That solves my problem (well enough at least).
I am a bit confused what is going on, but I made https://github.com/NixOS/nixpkgs/pull/144193/files in part so we could make toRustTarget
and friends less tied to specific rust packages. I hope that might help going forward.
Hey hey, long time listener first-time caller :wave: I was greeted with an error in the overlay this morning and I was wondering if I could get some help on figuring out what went wrong :)
I have the usual line in my
shell.nix
:And it errored with:
The file in question --
rust-overlay.nix
-- looks like below. It's giving out abouthostTargets
ingetComponents