PortValhalla/scripts/Common/Scripts/eval-module.fish
2024-07-20 00:47:48 +02:00

15 lines
336 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