Add an input type "nix" for passing arbitrary Nix expressions

This commit is contained in:
Eelco Dolstra
2013-09-30 12:03:25 +02:00
parent 4dd1197d89
commit f50477141d
5 changed files with 21 additions and 10 deletions

View File

@ -141,11 +141,14 @@ fi
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; }")
[% ELSIF input.type == "string" %]
args+=(--arg '[% input.name %]' '"[% input.value %]"')
args+=(--arg '[% input.name %]' '"[% input.value %]"') # FIXME: escape
[% ELSIF input.type == "boolean" %]
args+=(--arg '[% input.name %]' '[% input.value %]')
[% ELSIF input.type == "nix" %]
args+=(--arg '[% input.name %]' '[% input.value %]') # FIXME: escape
[% ELSE %]
echo "$0: input [% input.name %] has unsupported type [% input.type %]" >&2
exit 1