mirror of
https://github.com/NixOS/nix.git
synced 2025-12-16 05:51:05 +01:00
nix-env --query: fix --json ignoring --drv-path
```json
{
"AMB-plugins": {
"drvPath": "/nix/store/l99cb7h2hy8dg005arsjbd9kx0w05d3h-AMB-plugins-0.8.1.drv",
"name": "AMB-plugins-0.8.1",
"outputName": "out",
"outputs": {
"out": null
},
"pname": "AMB-plugins",
"system": "x86_64-linux",
"version": "0.8.1"
},
"ArchiSteamFarm": {
"drvPath": "/nix/store/nhplgyjj34fz6hjmnyih25gxscfh8s7b-ArchiSteamFarm-5.4.12.5.drv",
"name": "ArchiSteamFarm-5.4.12.5",
"outputName": "out",
"outputs": {
"out": null
},
"pname": "ArchiSteamFarm",
"system": "x86_64-linux",
"version": "5.4.12.5"
},
...
```
This commit is contained in:
parent
a6e587923c
commit
a903f85f84
3 changed files with 10 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ nix-env -f ./user-envs.nix -qa --json --out-path | jq -e '.[] | select(.name ==
|
|||
.outputName == "out",
|
||||
(.outputs.out | test("'$NIX_STORE_DIR'.*-0\\.1"))
|
||||
] | all'
|
||||
nix-env -f ./user-envs.nix -qa --json --drv-path | jq -e '.[] | select(.name == "bar-0.1") | (.drvPath | test("'$NIX_STORE_DIR'.*-0\\.1\\.drv"))'
|
||||
|
||||
# Query descriptions.
|
||||
nix-env -f ./user-envs.nix -qa '*' --description | grepQuiet silly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue