Attempting to port https://askubuntu.com/questions/323437/how-to-prevent-wine-from-adding-file-associations to #NixOS (Specifically the registry patch)

wine = pkgs.wine64.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
(pkgs.writeTextFile {
name = "disable-winemenubuilder.patch";
text = ''
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -2590,7 +2590,8 @@
[Services]
-HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r"
+HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -r"
HKLM,"System\\CurrentControlSet\\Services\\Dnscache\\Parameters",,16
'';
})
];
});

Unfortunately this keeps giving me an error:

> applying patch /nix/store/wa6wgy2jlw29frhmndfi9c9ri55njsxg-disable-winemenubuilder.patch
> patching file loader/wine.inf.in
> patch: **** malformed patch at line 9:
>

Anyone have any ideas?
(Tagging Git as well since it's a git patch)

#Nix #Debugging #Git

How to prevent Wine from adding file associations?

Wine automatically adds certain mimetypes and file associations (e.g. notepad.exe for .ini files). There already is an answer that explains how to remove these associations. But how can one preven...