Add an input type "nix" for passing arbitrary Nix expressions
This commit is contained in:
@ -247,10 +247,12 @@ END;
|
||||
BLOCK renderShortInputValue;
|
||||
IF input.type == "build" || input.type == "sysbuild" %]
|
||||
<a href="[% c.uri_for('/build' input.dependency.id) %]">[% input.dependency.id %]</a>
|
||||
[% ELSIF input.type == "string" || input.type == "boolean" %]
|
||||
<tt>"[% input.value %]"</tt>
|
||||
[% ELSIF input.type == "string" %]
|
||||
<tt>"[% HTML.escape(input.value) %]"</tt>
|
||||
[% ELSIF input.type == "nix" || input.type == "boolean" %]
|
||||
<tt>[% HTML.escape(input.value) %]</tt>
|
||||
[% ELSE %]
|
||||
<tt>[% input.uri %][% IF input.revision %] (r[% input.revision %])[% END %]</tt>
|
||||
<tt>[% HTML.escape(input.uri) %][% IF input.revision %] (r[% HTML.escape(input.revision) %])[% END %]</tt>
|
||||
[% END %]
|
||||
[% END;
|
||||
|
||||
@ -292,13 +294,15 @@ BLOCK renderInputs; %]
|
||||
<td>
|
||||
[% IF input.type == "build" || input.type == "sysbuild" %]
|
||||
[% INCLUDE renderFullBuildLink build=input.dependency %]
|
||||
[% ELSIF input.type == "string" || input.type == "boolean" %]
|
||||
<tt>"[% input.value %]"</tt>
|
||||
[% ELSIF input.type == "string" %]
|
||||
<tt>"[% HTML.escape(input.value) %]"</tt>
|
||||
[% ELSIF input.type == "nix" || input.type == "boolean" %]
|
||||
<tt>[% HTML.escape(input.value) %]</tt>
|
||||
[% ELSE %]
|
||||
<tt>[% input.uri %]</tt>
|
||||
<tt>[% HTML.escape(input.uri) %]</tt>
|
||||
[% END %]
|
||||
</td>
|
||||
<td>[% IF input.revision %][% input.revision %][% END %]</td>
|
||||
<td>[% IF input.revision %][% HTML.escape(input.revision) %][% END %]</td>
|
||||
<td><tt>[% input.path %]</tt></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user