runCommandLocalOverridable: respect the env argument

This commit is contained in:
2025-07-22 22:10:22 +00:00
parent e32c9d42d9
commit a5223320af

View File

@@ -9,7 +9,7 @@
}:
{
# like `runCommandLocal`, but can be `.overrideAttrs` and supports standard phases/hooks like `postBuild`, etc.
runCommandLocalOverridable = name: env: buildPhase: stdenvNoCC.mkDerivation {
runCommandLocalOverridable = name: env: buildPhase: stdenvNoCC.mkDerivation ({
inherit name;
preferLocalBuild = true;
dontUnpack = true;
@@ -23,7 +23,7 @@
"runHook postInstall"
"runHook postFixup"
];
};
} // env);
# given some package and a path, extract the item at `${package}/${path}` into
# its own package, but otherwise keeping the same path.
# this is done by copying the bits, so as to avoid including the item's neighbors
@@ -50,9 +50,9 @@
else
wantMan;
in
runCommandLocalOverridable "${pkg.pname or pkg.name}-${suffix}" {
runCommandLocalOverridable "${pkg.pname or pkg.name}-${suffix}" ({
outputs = [ "out" ] ++ lib.optionals wantMan' [ "man" ];
} ''
} // args) ''
tryLink() {
local srcPath="$1/$2"
local dirName=$(dirname "$2")