Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix build: make dry-run to print a json output if --json is enabled #4750

Merged
merged 1 commit into from
May 3, 2021

Conversation

picnoir
Copy link
Member

@picnoir picnoir commented Apr 27, 2021

Fixes #4747

Before:

./outputs/out/bin/nix build --dry-run --experimental-features nix-command --json -f default.nix don't know how to build these paths (may be caused by read-only store access):
  /nix/store/cm7abdds6mr136s5x59d20z5h4c28adw-nix-2.4pre20210423_fe2bf46.drv

After:

[nix-shell:~/code-root/github.com/NixOS/nix]$ ./outputs/out/bin/nix build --dry-run --experimental-features nix-command --json -f default.nix don't know how to build these paths (may be caused by read-only store access):
  /nix/store/5llx7yykal9jsrj0fkwk3x4fzwy2wahg-nix-2.4pre20210427_7dca9c2.drv
[{"drvPath":"/nix/store/5llx7yykal9jsrj0fkwk3x4fzwy2wahg-nix-2.4pre20210427_7dca9c2.drv","outputs":{"out":"/nix/store/plnsw4ygkgi22rkjxh68ylvyhawwrprs-nix-2.4pre20210427_7dca9c2"}}]

@edolstra edolstra merged commit ef13c9c into NixOS:master May 3, 2021
@picnoir picnoir deleted the nin-build-dry-run-json branch May 3, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nix build --dry-run --json $pathToDrv: empty output
2 participants