diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-05-09 20:36:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 20:36:29 +0200 |
commit | 9524f57dd5b3944c819dd594aed8ed941932ef56 (patch) | |
tree | 172b5954d9fe3c3deba679290e1c0a2a7f42fcc5 /pkgs/stdenv/generic | |
parent | f589521841a406a1c2d5b9b0f88d677e73f5ab7a (diff) | |
parent | 2023766e31d99080ae615fc3a9293fd0228703cc (diff) | |
download | nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar.gz nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar.bz2 nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar.lz nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar.xz nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.tar.zst nixpkgs-9524f57dd5b3944c819dd594aed8ed941932ef56.zip |
Merge pull request #230666 from alyssais/inputDerivation-passAsFile
stdenv: fix inputDerivation with passAsFile
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 98bd01d4e3e..40ad357739b 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -545,7 +545,13 @@ lib.extendDerivation # binaries). By writing this to $out, Nix can find and register # them as runtime dependencies (since Nix greps for store paths # through $out to find them) - args = [ "-c" "export > $out" ]; + args = [ "-c" '' + export > $out + for var in $passAsFile; do + pathVar="''${var}Path" + printf "%s" "$(< "''${!pathVar}")" >> $out + done + '' ]; # inputDerivation produces the inputs; not the outputs, so any # restrictions on what used to be the outputs don't serve a purpose |