PortValhalla/scripts/Common/Scripts/eval-module.fish

17 lines
354 B
Fish

#!/bin/env fish
function evalModule --argument-names modulePath property
set -l argv $argv[3..]
if not contains -- "--json" $argv
set -a argv --raw
end
FILE=(realpath "$modulePath") \
PROPERTY="$property" \
nix eval \
--file "$(status dirname)/../../../lib/eval-module.nix" \
$argv
end
evalModule $argv