diff --git a/pkgs/development/python-modules/pycryptodome/default.nix b/pkgs/development/python-modules/pycryptodome/default.nix index 29ef48bde165..0b15832ba28a 100644 --- a/pkgs/development/python-modules/pycryptodome/default.nix +++ b/pkgs/development/python-modules/pycryptodome/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , callPackage , fetchFromGitHub +, fetchpatch , cffi , gmp }: @@ -21,6 +22,13 @@ buildPythonPackage rec { hash = "sha256-SPRoAfwP1MFlVzZsVWmXDWUY5Yje7eg7d+9zJhZNXrw="; }; + patches = [ + (fetchpatch { + url = "https://github.com/Legrandin/pycryptodome/commit/1c043abb089ddbc2fc43d1c169672688ccc64c64.patch"; + sha256 = "sha256-QklwOlFpQNAH0CpR06fWSZqx8C97RV8BRsKbp2j8js8="; + }) + ]; + postPatch = '' substituteInPlace lib/Crypto/Math/_IntegerGMP.py \ --replace 'load_lib("gmp"' 'load_lib("${gmp}/lib/libgmp.so.10"'