nixpkgs: don't fail build if a patch has already been applied
This commit is contained in:
@@ -51,6 +51,13 @@ let
|
||||
inherit variant;
|
||||
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; };
|
||||
|
Reference in New Issue
Block a user