| 10 Oct 2021 |
tomberek | Does turning on ca-references help? | 14:46:26 |
balsoft | "turning on" as in adding to experimental-features ? | 15:17:57 |
balsoft | If so, no, doesn't help | 15:23:11 |
tomberek | Hrm. How can I re-create the bug? Got a flake or script? | 15:55:45 |
balsoft | Yep, a flake | 15:55:53 |
balsoft | github:soywod/himalaya | 15:56:03 |
balsoft | Or github:balsoft/simple-osd-daemons | 15:56:29 |
balsoft | In reply to @tomberek:matrix.org Hrm. How can I re-create the bug? Got a flake or script? It works on 2.4pre20211001_4f49615 | 16:17:15 |
balsoft | Ok, so the problem is almost definitely 4806f2f6b0fd2cae401b89fe19d8c528ffd88b5f | 16:21:38 |
tomberek | Is this doing IFD? | 16:32:33 |
balsoft | Yes | 16:32:45 |
balsoft | It generates a Cargo.nix file from Cargo.toml and then imports that file | 16:32:57 |
tomberek | okay, i've recreated with that flake. can we re-create with a minimal IFD example to confirm that is the issue? | 16:44:40 |
balsoft | Hm, let me try | 16:45:42 |
balsoft | Ok, simple IFD works:
nix-repl> import (pkgs.writeText "file.nix" "{}")
{ }
| 16:46:13 |
balsoft | And even this works:
nix-repl> import (pkgs.writeText "file.nix" ''{ foo = "${pkgs.hello}"; }'')
{ foo = "/nix/store/15c875mwri8xx3s0gqsdkdw7sqqyv55c-hello-2.10"; }
| 16:46:46 |
balsoft | So I think it's a bit more intricate | 16:46:51 |
balsoft | Aha | 16:47:01 |
balsoft | Hmm, no | 16:48:09 |
balsoft | Even referencing $out works | 16:48:13 |
balsoft | nix-repl> import (pkgs.runCommand "file.nix" {} ''echo "{ foo = $out; }" > $out'')
{ foo = /nix/store/56zm7p8bpnrxhpbw8plaxwngdr6y094y-file.nix; }
| 16:48:26 |
balsoft | I wonder what's special about crate2nix | 16:48:44 |
tomberek | this is happening in a primop, filterSource or path | 16:49:19 |
balsoft | Yeah, I saw the commit message | 16:49:34 |
tomberek | "addPath" is used by those, perhaps crate2nix uses one of them? | 16:49:38 |
balsoft | So I'm looking for those in crate2nix | 16:49:38 |
balsoft | Interestingly, once it has been built once using older nix it then works with newer nix | 16:50:48 |
balsoft | Although I guess this is down to flake caching | 16:50:54 |
balsoft | Yes | 16:51:35 |
balsoft | Here's the trace
error: store path '/nix/store/d0vm5k50fa9d6cjlch6s9cw61gn80xds-himalaya-crate2nix' is not allowed to have references
… while adding path '/nix/store/d0vm5k50fa9d6cjlch6s9cw61gn80xds-himalaya-crate2nix/crate'
at /nix/store/v316zxg1w7x8343xs9lmhkh5hvjmprsq-source/lib/sources.nix:240:17:
239| inherit origSrc filter name;
240| outPath = builtins.path { inherit filter name; path = origSrc; };
| ^
241| };
… while evaluating the attribute 'src' of the derivation 'rust_himalaya-0.4.0'
at /nix/store/v316zxg1w7x8343xs9lmhkh5hvjmprsq-source/pkgs/stdenv/generic/make-derivation.nix:203:11:
202| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
203| name =
| ^
204| let
| 16:51:45 |