diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index c6b6acd5f8e2..ecd633fdbe43 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -77,17 +77,21 @@ let (lib.remove null) ]; in runCommand name - rec { + (rec { inherit manifest ignoreCollisions checkCollisionContents passthru meta pathsToLink extraPrefix postBuild - nativeBuildInputs buildInputs pname version; + nativeBuildInputs buildInputs; pkgs = builtins.toJSON chosenOutputs; extraPathsFrom = lib.optional includeClosures (writeClosure pathsForClosure); preferLocalBuild = true; allowSubstitutes = false; # XXX: The size is somewhat arbitrary passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ]; - } + } // lib.optionalAttrs (pname != null) { + inherit pname; + } // lib.optionalAttrs (version != null) { + inherit version; + }) '' ${buildPackages.perl}/bin/perl -w ${builder} eval "$postBuild"