NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.54k stars 1.5k forks source link

Test "fix exportReferencesGraph when given store subpath" #10565

Open roberth opened 6 months ago

roberth commented 6 months ago

Priorities

Add :+1: to issues you find important.

ShamrockLee commented 4 months ago

I'm still inspecting how it works, but paths returned from lib.getExe seem to reproduce this issue reliably.

Here is a single-line reproducer based on Nixpkgs: nix-build --no-out-link -E "let lib = import ./lib; pkgs = import ./. { }; path = lib.getExe pkgs.hello; in pkgs.runCommandLocal ''reference-graph-structured'' { __structuredAttrs = true; nativeBuildInputs = [ pkgs.buildPackages.jq ]; exportReferencesGraph.graph = [ path ]; } ''jq . \$NIX_ATTRS_JSON_FILE | tee \$out''"

Here is the initial discussion: https://github.com/NixOS/nixpkgs/issues/316652#issuecomment-2145130636