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" \
|
2024-07-20 11:54:04 +00:00
|
|
|
nix eval --extra-experimental-features "nix-command flakes" \
|
2024-07-19 22:36:19 +00:00
|
|
|
--file "$(status dirname)/../../../lib/eval-module.nix" \
|
|
|
|
$argv
|
2024-07-09 00:22:12 +00:00
|
|
|
end
|