applyPatches: Fix a bug (#283887)
This commit is contained in:
parent
8e6598a68c
commit
6aa4ed4487
1 changed files with 7 additions and 6 deletions
|
@ -904,14 +904,15 @@ rec {
|
|||
else throw "applyPatches: please supply a `name` argument because a default name can only be computed when the `src` is a path or is an attribute set with a `name` attribute."
|
||||
) + "-patched"
|
||||
, patches ? [ ]
|
||||
, prePatch ? ""
|
||||
, postPatch ? ""
|
||||
, ...
|
||||
}@args:
|
||||
if patches == [ ] && postPatch == ""
|
||||
if patches == [ ] && prePatch == "" && postPatch == ""
|
||||
then src # nothing to do, so use original src to avoid additional drv
|
||||
else stdenvNoCC.mkDerivation
|
||||
{
|
||||
inherit name src patches postPatch;
|
||||
({
|
||||
inherit name src patches prePatch postPatch;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
phases = "unpackPhase patchPhase installPhase";
|
||||
|
@ -919,7 +920,7 @@ rec {
|
|||
}
|
||||
# Carry `meta` information from the underlying `src` if present.
|
||||
// (optionalAttrs (src?meta) { inherit (src) meta; })
|
||||
// (removeAttrs args [ "src" "name" "patches" "postPatch" ]);
|
||||
// (removeAttrs args [ "src" "name" "patches" "prePatch" "postPatch" ]));
|
||||
|
||||
/* An immutable file in the store with a length of 0 bytes. */
|
||||
emptyFile = runCommand "empty-file"
|
||||
|
|
Loading…
Reference in a new issue