Allow applying custom functions during evaluation
This commit is contained in:
parent
2848e5b52c
commit
5fa9f49b58
2 changed files with 23 additions and 2 deletions
scripts/Common/Scripts
|
@ -6,6 +6,11 @@ function evalModule --argument-names modulePath property
|
|||
set -a argv --raw
|
||||
end
|
||||
|
||||
set -l nixPkgs 'import <nixpkgs> { config = {}; overlay = []; }'
|
||||
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv
|
||||
FILE=(realpath "$modulePath") \
|
||||
PROPERTY="$property" \
|
||||
nix eval \
|
||||
--file "$(status dirname)/../../../lib/eval-module.nix" \
|
||||
$argv
|
||||
end
|
||||
|
||||
evalModule $argv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue