15 lines
387 B
Fish
Executable file
15 lines
387 B
Fish
Executable file
#!/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
|