buildEnv: add new parameters: extraPrefix and buildInputs
This commit is contained in:
parent
bab211893b
commit
fa33b083eb
|
@ -142,10 +142,11 @@ while (scalar(keys %postponed) > 0) {
|
||||||
|
|
||||||
|
|
||||||
# Create the symlinks.
|
# Create the symlinks.
|
||||||
|
my $extraPrefix = $ENV{"extraPrefix"};
|
||||||
my $nrLinks = 0;
|
my $nrLinks = 0;
|
||||||
foreach my $relName (sort keys %symlinks) {
|
foreach my $relName (sort keys %symlinks) {
|
||||||
my ($target, $priority) = @{$symlinks{$relName}};
|
my ($target, $priority) = @{$symlinks{$relName}};
|
||||||
my $abs = "$out/$relName";
|
my $abs = "$out" . "$extraPrefix" . "/$relName";
|
||||||
next unless isInPathsToLink $relName;
|
next unless isInPathsToLink $relName;
|
||||||
if ($target eq "") {
|
if ($target eq "") {
|
||||||
#print "creating directory $relName\n";
|
#print "creating directory $relName\n";
|
||||||
|
|
|
@ -21,14 +21,20 @@
|
||||||
# directories in the list is not symlinked.
|
# directories in the list is not symlinked.
|
||||||
pathsToLink ? ["/"]
|
pathsToLink ? ["/"]
|
||||||
|
|
||||||
, # Shell command to run after building the symlink tree.
|
, # Root the result in directory "$out${extraPrefix}", e.g. "/share".
|
||||||
|
extraPrefix ? ""
|
||||||
|
|
||||||
|
, # Shell commands to run after building the symlink tree.
|
||||||
postBuild ? ""
|
postBuild ? ""
|
||||||
|
|
||||||
|
, # Additional inputs. Handy e.g. if using makeWrapper in `postBuild`.
|
||||||
|
buildInputs ? []
|
||||||
|
|
||||||
, passthru ? {}
|
, passthru ? {}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
runCommand name
|
runCommand name
|
||||||
{ inherit manifest ignoreCollisions passthru pathsToLink postBuild;
|
{ inherit manifest ignoreCollisions passthru pathsToLink extraPrefix postBuild buildInputs;
|
||||||
pkgs = builtins.toJSON (map (drv: {
|
pkgs = builtins.toJSON (map (drv: {
|
||||||
paths = [ drv ]; # FIXME: handle multiple outputs
|
paths = [ drv ]; # FIXME: handle multiple outputs
|
||||||
priority = drv.meta.priority or 5;
|
priority = drv.meta.priority or 5;
|
||||||
|
|
Loading…
Reference in a new issue