applyPatches: skip creating additional drv when no patches
If there are no `patches` or `postPatch`, then this will just do work to make something equivalent to `src`. Instead, just return `src` in that case.
This commit is contained in:
parent
317484b1ea
commit
52c27352ce
1 changed files with 4 additions and 1 deletions
|
@ -946,7 +946,10 @@ rec {
|
|||
, patches ? [ ]
|
||||
, postPatch ? ""
|
||||
, ...
|
||||
}@args: stdenvNoCC.mkDerivation
|
||||
}@args:
|
||||
if patches == [ ] && postPatch == ""
|
||||
then src # nothing to do, so use original src to avoid additional drv
|
||||
else stdenvNoCC.mkDerivation
|
||||
{
|
||||
inherit name src patches postPatch;
|
||||
preferLocalBuild = true;
|
||||
|
|
Loading…
Reference in a new issue