Nix: apply patches to fusepy

This commit is contained in:
Toast 2025-11-15 01:14:45 +01:00
parent 4a64d660f7
commit 8e1e61ed50

View file

@ -16,6 +16,17 @@ final: prev: {
python3 = prev.python3.override {
packageOverrides = pyFinal: pyPrev: {
partftpy = pyFinal.callPackage ./partftpy { };
fusepy-copyparty = pyPrev.fusepy.overridePythonAttrs (old: {
pname = "${old.pname}-copyparty";
patchPhase = old.patchPhase + ''
python3 ${./../../../scripts/uncomment.py} fuse.py
sed -ri '/self.__critical_exception = e/d' fuse.py
awk '/^log =/{s=0} !s; /^from traceback im/{s=1;print"from functools import partial";print"basestring = str"}' < fuse.py > temp
awk '/LoggingMixIn:/{exit} --s<0;/self.use_ns = getattr/{s=7}' < temp > fuse.py
awk "/if _machine =/{s=0} /'(mips|ppc|ppc64)'/{s=1} !s" < fuse.py > temp
mv temp fuse.py
'';
});
};
};
}