python3Packages.malduck: fix build on python 3.14
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
pefile,
|
||||
pycryptodomex,
|
||||
pyelftools,
|
||||
pythonAtLeast,
|
||||
setuptools,
|
||||
pytestCheckHook,
|
||||
typing-extensions,
|
||||
@@ -27,6 +28,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-Btx0HxiZWrb0TDpBokQGtBE2EDK0htONe/DwqlPgAd4=";
|
||||
};
|
||||
|
||||
patches = lib.optionals (pythonAtLeast "3.14") [
|
||||
# python 3.14 ctypes rejects `_pack_` without `_layout_ = "ms"`.
|
||||
./python-3.14-ctypes-layout.patch
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/malduck/structure.py
|
||||
+++ b/malduck/structure.py
|
||||
@@ -53,6 +53,7 @@
|
||||
fields.append((field, type_))
|
||||
|
||||
class Klass(ctypes.Structure):
|
||||
+ _layout_ = "ms"
|
||||
_pack_ = self._pack_
|
||||
_fields_ = fields
|
||||
|
||||
Reference in New Issue
Block a user