nixpkgs: don't fail build if a patch has already been applied
This commit is contained in:
parent
b6d9d58a14
commit
75ae868bde
|
@ -51,6 +51,13 @@ let
|
||||||
inherit variant;
|
inherit variant;
|
||||||
date = unpatchedSrc.lastModifiedDate;
|
date = unpatchedSrc.lastModifiedDate;
|
||||||
};
|
};
|
||||||
|
# skip applied patches
|
||||||
|
prePatch = ''
|
||||||
|
realpatch=$(command -v patch)
|
||||||
|
patch() {
|
||||||
|
OUT=$($realpatch "$@") || echo "$OUT" | grep "Skipping patch" -q
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
src = if doPatch then patchedSrc else { outPath = unpatchedSrc; };
|
src = if doPatch then patchedSrc else { outPath = unpatchedSrc; };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user