Implicitly produce raw output
This commit is contained in:
parent
42c7d24198
commit
7956df2e36
2 changed files with 8 additions and 2 deletions
scripts/Common/Scripts
|
@ -1,5 +1,11 @@
|
|||
#!/bin/env fish
|
||||
function evalModule --argument-names modulePath property
|
||||
set -l argv $argv[3..]
|
||||
|
||||
if not contains -- "--json" $argv
|
||||
set -a argv --raw
|
||||
end
|
||||
|
||||
set -l nixPkgs 'import <nixpkgs> { config = {}; overlay = []; }'
|
||||
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv[3..]
|
||||
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue