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

15 lines
387 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 --extra-experimental-features "nix-command flakes" \
--file "$(status dirname)/../../../lib/eval-module.nix" \
$argv
end