forked from lix-project/hydra
Pass along drvPath and outputName for inputs that are previous builds.
This allows importing the .drv and getting the same store paths as if the input had been passed in as nix expressions defining a proper derivation.
This commit is contained in:
parent
9e33f07cb8
commit
2a240e458e
|
@ -105,10 +105,14 @@ sub fetchInputBuild {
|
||||||
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
||||||
my $version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
my $version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
||||||
|
|
||||||
|
my $mainOutput = getMainOutput($prevBuild);
|
||||||
|
|
||||||
return
|
return
|
||||||
{ storePath => getMainOutput($prevBuild)->path
|
{ storePath => $mainOutput->path
|
||||||
, id => $prevBuild->id
|
, id => $prevBuild->id
|
||||||
, version => $version
|
, version => $version
|
||||||
|
, outputName => $mainOutput->name
|
||||||
|
, drvPath => $prevBuild->drvPath
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +283,8 @@ sub buildInputToString {
|
||||||
(defined $input->{gitTag} ? "; gitTag = \"" . $input->{gitTag} . "\"" : "") .
|
(defined $input->{gitTag} ? "; gitTag = \"" . $input->{gitTag} . "\"" : "") .
|
||||||
(defined $input->{shortRev} ? "; shortRev = \"" . $input->{shortRev} . "\"" : "") .
|
(defined $input->{shortRev} ? "; shortRev = \"" . $input->{shortRev} . "\"" : "") .
|
||||||
(defined $input->{version} ? "; version = \"" . $input->{version} . "\"" : "") .
|
(defined $input->{version} ? "; version = \"" . $input->{version} . "\"" : "") .
|
||||||
|
(defined $input->{outputName} ? "; outputName = \"" . $input->{outputName} . "\"" : "") .
|
||||||
|
(defined $input->{drvPath} ? "; drvPath = " . $input->{drvPath} . "" : "") .
|
||||||
";}";
|
";}";
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|
Loading…
Reference in a new issue