-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugderivation-buildThe process of building an individual derivation (see also sandbox label)The process of building an individual derivation (see also sandbox label)storeIssues and pull requests concerning the Nix storeIssues and pull requests concerning the Nix store
Description
Describe the bug
When for example an output is not written, this results in an exception, which is not written to the store's build log; only to the CLI.
Nonetheless, the CLI claims that nix log foo.drv
has the full log.
Steps To Reproduce
[nix-shell:~/src/nixpkgs-master]$ nix build --expr 'with import ./. {}; runCommand "test" { } "echo hi"' --impure
error: build of '/nix/store/pmjy7fp4v6jjb1v06fasrzgs4sg2rvam-test.drv' on 'ssh://agent-2' failed: builder for '/nix/store/pmjy7fp4v6jjb1v06fasrzgs4sg2rvam-test.drv' failed to produce output path for output 'out' at '/nix/store/pmjy7fp4v6jjb1v06fasrzgs4sg2rvam-test.drv.chroot/root/nix/store/3q3hxld9r4i7x4xwp5m8hn7kbln76c2r-test'
error: Cannot build '/nix/store/pmjy7fp4v6jjb1v06fasrzgs4sg2rvam-test.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/3q3hxld9r4i7x4xwp5m8hn7kbln76c2r-test
Last 1 log lines:
> hi
For full logs, run:
nix log /nix/store/pmjy7fp4v6jjb1v06fasrzgs4sg2rvam-test.drv
[nix-shell:~/src/nixpkgs-master]$ nix log --expr 'with import ./. {}; runCommand "test" { } "echo hi"' --impure
hi
Note also Reason: builder failed with exit code 1.
, which is also false, but I believe I've already created an issue for that.
It probably originates from the internal-ish build hook.
Expected behavior
Append the reason for the build failure to the store's build log file.
It could be logged to the CLI as well, if expedient, but the CLI will show the exception anyway, so technically it'd be duplicate logging.
Metadata
Additional context
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.
Jayman2000
Metadata
Metadata
Assignees
Labels
bugderivation-buildThe process of building an individual derivation (see also sandbox label)The process of building an individual derivation (see also sandbox label)storeIssues and pull requests concerning the Nix storeIssues and pull requests concerning the Nix store