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

6 lines
271 B
Fish

#!/bin/env fish
function evalModule --argument-names modulePath property
set -l nixPkgs 'import <nixpkgs> { config = {}; overlay = []; }'
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv[3..]
end