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

@ -157,7 +157,7 @@ sub fetchInput {
elsif ($type eq "sysbuild") {
@inputs = fetchInputSystemBuild($db, $project, $jobset, $name, $value);
}
elsif ($type eq "string") {
elsif ($type eq "string" || $type eq "nix") {
die unless defined $value;
@inputs = { value => $value };
}
@ -241,6 +241,9 @@ sub inputsToArgs {
when ("boolean") {
push @res, "--arg", $input, booleanToString($exprType, $alt->{value});
}
when ("nix") {
push @res, "--arg", $input, $alt->{value};
}
default {
push @res, "--arg", $input, buildInputToString($exprType, $alt);
}