0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

fetchpatch: add support for patches to files with apostrophes (#410320)

This commit is contained in:
Philip Taron 2025-06-03 08:20:49 -07:00 committed by GitHub
commit ae61cffc49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -67,7 +67,7 @@ lib.throwIfNot (excludes == [ ] || includes == [ ])
${lib.optionalString (relative != null) "-p1 -i ${lib.escapeShellArg relative}/'*'"} \
"$out" \
| sort -u | sed -e 's/[*?]/\\&/g' \
| xargs -I{} \
| xargs -I{} --delimiter='\n' \
filterdiff \
--include={} \
--strip=${toString stripLen} \

View file

@ -48,4 +48,22 @@ in
else
"sha256-SJHk8XrutqAyoIdORlhCpBCN626P+uzed7mjKz5eQYY=";
};
fileWithSpace = testers.invalidateFetcherByDrvHash fetchpatch {
url = "https://github.com/jfly/annoying-filenames/commit/1e86a219f5fc9c4137b409bc9c38036f3922724b.patch";
sha256 =
if isFetchpatch2 then
"sha256-RB6pjigoXtzHILkGFXYd3Lz2aM9DvO0NRmLdey1N6gg="
else
"sha256-aptUvVojqIIIVNuHqkl+C+dZBGFfs+1MUd0FNV+4j4E=";
};
fileWithApostrophe = testers.invalidateFetcherByDrvHash fetchpatch {
url = "https://github.com/jfly/annoying-filenames/commit/8b6d8f8d7094ce646523b3369cfdf5030289c66c.patch";
sha256 =
if isFetchpatch2 then
"sha256-CrQFmVvLEvWpo2ucVrWyLb5qk2GVOxyUbFN3hp9sV68="
else
"sha256-CrQFmVvLEvWpo2ucVrWyLb5qk2GVOxyUbFN3hp9sV68=";
};
}