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