Implicitly produce raw output

This commit is contained in:
Manuel Thalmann 2024-07-11 21:01:39 +02:00
parent 42c7d24198
commit 7956df2e36
2 changed files with 8 additions and 2 deletions
scripts/Common/Scripts

View file

@ -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