1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

Fix a crash in DerivedPath::Built::toJSON() with impure derivations

The use of 'nullptr' here didn't result in a null JSON value, but in a
nullptr being cast to a string, which aborts.
This commit is contained in:
Eelco Dolstra 2022-12-15 16:00:46 +01:00
parent 5d77c08858
commit 0687e16c4a
2 changed files with 6 additions and 4 deletions

View file

@ -12,6 +12,7 @@ clearStore
# Basic test of impure derivations: building one a second time should not use the previous result.
printf 0 > $TEST_ROOT/counter
nix build --dry-run --json --file ./impure-derivations.nix impure.all
json=$(nix build -L --no-link --json --file ./impure-derivations.nix impure.all)
path1=$(echo $json | jq -r .[].outputs.out)
path1_stuff=$(echo $json | jq -r .[].outputs.stuff)