1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-04-18 02:18:13 +00:00

Add --force to all patch invocations

This commit is contained in:
Marwan Aljubeh 2023-03-07 13:35:24 +00:00 committed by GitHub
parent e62b83a934
commit 42e0e4f3b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,14 +56,14 @@ in
for f in $(ls /run/current-system/patches 2> /dev/null); do
if test ! -e "${config.system.build.patches}/patches/$f"; then
patch --reverse --backup -d / -p1 < "/run/current-system/patches/$f" || true
patch --force --reverse --backup -d / -p1 < "/run/current-system/patches/$f" || true
fi
done
${concatMapStringsSep "\n" (f: ''
f="$(basename ${f})"
if ! patch --force --reverse --dry-run -d / -p1 < '${f}' &> /dev/null; then
patch --forward --backup -d / -p1 < '${f}' || true
patch --force --forward --backup -d / -p1 < '${f}' || true
fi
'') cfg.patches}
'';