diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-09-17 17:43:18 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-09-17 17:43:18 +0200 |
commit | fa33b083eb8f08f532e67efac264c866fb08bf51 (patch) | |
tree | 8203a2b46c646516b50d060dbe32261b00fd1519 /pkgs/build-support/buildenv | |
parent | bab211893bf3e03abb8843d7478628411acd05af (diff) | |
download | nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar.gz nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar.bz2 nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar.lz nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar.xz nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.tar.zst nixpkgs-fa33b083eb8f08f532e67efac264c866fb08bf51.zip |
buildEnv: add new parameters: extraPrefix and buildInputs
Diffstat (limited to 'pkgs/build-support/buildenv')
-rwxr-xr-x | pkgs/build-support/buildenv/builder.pl | 3 | ||||
-rw-r--r-- | pkgs/build-support/buildenv/default.nix | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index a272a84261e..fd8098caf13 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -142,10 +142,11 @@ while (scalar(keys %postponed) > 0) { # Create the symlinks. +my $extraPrefix = $ENV{"extraPrefix"}; my $nrLinks = 0; foreach my $relName (sort keys %symlinks) { my ($target, $priority) = @{$symlinks{$relName}}; - my $abs = "$out/$relName"; + my $abs = "$out" . "$extraPrefix" . "/$relName"; next unless isInPathsToLink $relName; if ($target eq "") { #print "creating directory $relName\n"; diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index 2ae8123faca..8cbf0dc6c8e 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -21,14 +21,20 @@ # directories in the list is not symlinked. 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 ? "" +, # Additional inputs. Handy e.g. if using makeWrapper in `postBuild`. + buildInputs ? [] + , passthru ? {} }: runCommand name - { inherit manifest ignoreCollisions passthru pathsToLink postBuild; + { inherit manifest ignoreCollisions passthru pathsToLink extraPrefix postBuild buildInputs; pkgs = builtins.toJSON (map (drv: { paths = [ drv ]; # FIXME: handle multiple outputs priority = drv.meta.priority or 5; |