nix
nix copied to clipboard
exportReferencesGraph doesn't work in `nix-shell`
Describe the bug
I'd expect the references graph to be in TMPDIR but it's not
Steps To Reproduce
{
cpio,
runCommand,
systemd,
}:
runCommand "initrd"
{
name = "initrd";
exportReferencesGraph = [
"systemd-graph"
systemd
];
# unsafeDiscardReferences.out = true;
}
''
ls .
''
Expected behavior
ls $TMPDIR
shows a systemd-graph file but it doesn't
Metadata
Additional context
Checklist
- [ ] checked latest Nix manual (source)
- [ ] checked open bug issues and pull requests for possible duplicates
Add :+1: to issues you find important.
This didn't work in the past to your knowledge did it? (Just trying to understand is this, strictly speaking, a feature request or a regression.)
Does this apply to both structuredAttrs and without?
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2025-06-11-nix-team-meeting-minutes-231/65543/1