!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

909 Members
For people hacking on the Nix package manager itself189 Servers

Load older messages


SenderMessageTime
10 Oct 2021
@tomberek:matrix.orgtomberekDoes turning on ca-references help?14:46:26
@balsoft:balsoft.rubalsoft "turning on" as in adding to experimental-features ? 15:17:57
@balsoft:balsoft.rubalsoftIf so, no, doesn't help15:23:11
@tomberek:matrix.orgtomberekHrm. How can I re-create the bug? Got a flake or script?15:55:45
@balsoft:balsoft.rubalsoftYep, a flake15:55:53
@balsoft:balsoft.rubalsoft github:soywod/himalaya 15:56:03
@balsoft:balsoft.rubalsoft Or github:balsoft/simple-osd-daemons 15:56:29
@balsoft:balsoft.rubalsoft
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:balsoft.rubalsoftOk, so the problem is almost definitely 4806f2f6b0fd2cae401b89fe19d8c528ffd88b5f16:21:38
@tomberek:matrix.orgtomberekIs this doing IFD?16:32:33
@balsoft:balsoft.rubalsoftYes16:32:45
@balsoft:balsoft.rubalsoft It generates a Cargo.nix file from Cargo.toml and then imports that file 16:32:57
@tomberek:matrix.orgtomberekokay, 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:balsoft.rubalsoftHm, let me try16:45:42
@balsoft:balsoft.rubalsoft

Ok, simple IFD works:

nix-repl> import (pkgs.writeText "file.nix" "{}")
{ }
16:46:13
@balsoft:balsoft.rubalsoft

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:balsoft.rubalsoftSo I think it's a bit more intricate16:46:51
@balsoft:balsoft.rubalsoftAha16:47:01
@balsoft:balsoft.rubalsoftHmm, no16:48:09
@balsoft:balsoft.rubalsoft Even referencing $out works 16:48:13
@balsoft:balsoft.rubalsoft
nix-repl> import (pkgs.runCommand "file.nix" {} ''echo "{ foo = $out; }" > $out'')
{ foo = /nix/store/56zm7p8bpnrxhpbw8plaxwngdr6y094y-file.nix; }
16:48:26
@balsoft:balsoft.rubalsoftI wonder what's special about crate2nix16:48:44
@tomberek:matrix.orgtomberekthis is happening in a primop, filterSource or path16:49:19
@balsoft:balsoft.rubalsoftYeah, I saw the commit message16:49:34
@tomberek:matrix.orgtomberek"addPath" is used by those, perhaps crate2nix uses one of them?16:49:38
@balsoft:balsoft.rubalsoftSo I'm looking for those in crate2nix16:49:38
@balsoft:balsoft.rubalsoftInterestingly, once it has been built once using older nix it then works with newer nix16:50:48
@balsoft:balsoft.rubalsoftAlthough I guess this is down to flake caching16:50:54
@balsoft:balsoft.rubalsoftYes16:51:35
@balsoft:balsoft.rubalsoft

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

Show newer messages


Back to Room ListRoom Version: 6