Merge remote-tracking branch 'origin/master' into build-ng
Conflicts: hydra-module.nix
This commit is contained in:
commit
90c462a222
|
@ -253,16 +253,29 @@ int main(int argc, char * * argv)
|
|||
EvalState state(searchPath);
|
||||
|
||||
AutoArgs autoArgs;
|
||||
Value * inputsSet = state.allocValue();
|
||||
state.mkAttrs(*inputsSet, autoArgs_.size());
|
||||
for (auto & i : autoArgs_) {
|
||||
Symbol inputName = state.symbols.create(i.first);
|
||||
bool first = true;
|
||||
for (auto & j : i.second) {
|
||||
Value * v = state.allocValue();
|
||||
if (j[0] == 'E')
|
||||
state.eval(state.parseExprFromString(string(j, 1), absPath(".")), *v);
|
||||
else
|
||||
mkString(*v, string(j, 1));
|
||||
autoArgs[state.symbols.create(i.first)].push_back(v);
|
||||
autoArgs[inputName].push_back(v);
|
||||
if (first) {
|
||||
inputsSet->attrs->push_back(Attr(inputName, v));
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Symbol sInputs = state.symbols.create("inputs");
|
||||
if (autoArgs.find(sInputs) == autoArgs.end()) {
|
||||
inputsSet->attrs->sort();
|
||||
autoArgs[sInputs].push_back(inputsSet);
|
||||
}
|
||||
|
||||
store = openStore();
|
||||
|
||||
|
|
|
@ -261,6 +261,8 @@ sub buildInputToString {
|
|||
")";
|
||||
} else {
|
||||
$result = "{ outPath = builtins.storePath " . $input->{storePath} . "" .
|
||||
"; inputType = \"" . $input->{type} . "\"" .
|
||||
(defined $input->{uri} ? "; uri = \"" . $input->{uri} . "\"" : "") .
|
||||
(defined $input->{revNumber} ? "; rev = " . $input->{revNumber} . "" : "") .
|
||||
(defined $input->{revision} ? "; rev = \"" . $input->{revision} . "\"" : "") .
|
||||
(defined $input->{revCount} ? "; revCount = " . $input->{revCount} . "" : "") .
|
||||
|
|
|
@ -277,7 +277,13 @@ BLOCK renderDiffUri;
|
|||
url = res.0;
|
||||
branch = res.1;
|
||||
IF bi1.type == "hg" || bi1.type == "git" %]
|
||||
<a target="_blank" href="[% HTML.escape("/api/scmdiff?uri=$url&rev1=$bi1.revision&rev2=$bi2.revision&type=$bi1.type&branch=$branch") %]">[% contents %]</a>
|
||||
<a target="_blank" href="[% HTML.escape(c.uri_for('/api/scmdiff', {
|
||||
uri = url,
|
||||
rev1 = bi1.revision,
|
||||
rev2 = bi2.revision,
|
||||
type = bi1.type,
|
||||
branch = branch
|
||||
})) %]">[% contents %]</a>
|
||||
[% ELSE;
|
||||
contents;
|
||||
END;
|
||||
|
|
Loading…
Reference in a new issue