2024-07-09 00:22:12 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
function evalModule --argument-names modulePath property
|
2024-07-11 19:01:39 +00:00
|
|
|
set -l argv $argv[3..]
|
|
|
|
|
|
|
|
if not contains -- "--json" $argv
|
|
|
|
set -a argv --raw
|
|
|
|
end
|
|
|
|
|
2024-07-19 22:36:19 +00:00
|
|
|
FILE=(realpath "$modulePath") \
|
|
|
|
PROPERTY="$property" \
|
|
|
|
nix eval \
|
|
|
|
--file "$(status dirname)/../../../lib/eval-module.nix" \
|
|
|
|
$argv
|
2024-07-09 00:22:12 +00:00
|
|
|
end
|