You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the second path of why-depends is not an output but a source, the command fails.
Note that source-ness of a path is not an intrinsic property, highlighting that --derivation makes the why-depends logic trickier than strictly necessary.
Steps To Reproduce
Construed example. Not a lot of
Open nix repl . in nixpkgs.
nix-repl> :lf nix
Added 15 variables.
nix-repl> let pkg = packages.x86_64-linux.default; in "nix why-depends --derivation ${pkg.drvPath} ${pkg.src}"
"nix why-depends --derivation /nix/store/6955rml5885mskbq7xzqnv6bg4c796i7-nix-2.15.0pre20230314_9ec1a3a.drv /nix/store/ny8qz9mlx58g3mm2zxlmmzmxxfvakhw9-source"
nix-repl> :q
$ nix why-depends --derivation /nix/store/6955rml5885mskbq7xzqnv6bg4c796i7-nix-2.15.0pre20230314_9ec1a3a.drv /nix/store/ny8qz9mlx58g3mm2zxlmmzmxxfvakhw9-source
error: '/nix/store/ny8qz9mlx58g3mm2zxlmmzmxxfvakhw9-source' does not have a known deriver
Expected behavior
Do not look for a deriver of a source; just report the chain. --derivation is on the way out, so this issue is mostly to document this specific use case.
➜ nix path-info --json --derivation --extra-experimental-features "nix-command flakes" /nix/var/nix/profiles/system-123-link/
error: '/nix/store/60xn4zmr9fj87gfh18p0xkwj9fkrr7cx-nixos-system-host-23.11' does not have a known deriver
Describe the bug
When the second path of
why-depends
is not an output but a source, the command fails.Note that source-ness of a path is not an intrinsic property, highlighting that
--derivation
makes thewhy-depends
logic trickier than strictly necessary.Steps To Reproduce
Construed example. Not a lot of
Open
nix repl .
innixpkgs
.Expected behavior
Do not look for a deriver of a source; just report the chain.
--derivation
is on the way out, so this issue is mostly to document this specific use case.nix-env --version
outputAdditional context
Add any other context about the problem here.
--derivation
considered harmful, remove it in lieu of^
and new stuff #7261Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: