1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, isPy3k 6, setuptoolsDarcs 7, darcsver 8, pkgs 9}: 10 11buildPythonPackage rec { 12 pname = "pycryptopp"; 13 version = "0.7.1.869544967005693312591928092448767568728501330214"; 14 disabled = isPy3k; # see https://bitbucket.org/pypy/pypy/issue/1190/ 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "17v98bhh3nd6rkw0kk1xmnc9vm5ql0fji4in2wyd4zlvlfhmgb88"; 19 }; 20 21 patches = [ 22 (fetchpatch { 23 name = "pycryptopp-cryptopp_6.patch"; 24 url = "https://aur.archlinux.org/cgit/aur.git/plain/api_change.patch?h=pycryptopp&id=55f2973d6ca5e9e70438f2eadb7fb575b1a5048d"; 25 sha256 = "0lvl2d32d2vkb0v6d39p9whda5bdrmlsjd41zy0x0znqm53a9i99"; 26 stripLen = 1; 27 extraPrefix = "src/"; 28 }) 29 ]; 30 31 # Prefer crypto++ library from the Nix store over the one that's included 32 # in the pycryptopp distribution. 33 preConfigure = "export PYCRYPTOPP_DISABLE_EMBEDDED_CRYPTOPP=1"; 34 35 buildInputs = [ setuptoolsDarcs darcsver pkgs.cryptopp ]; 36 37 meta = with lib; { 38 homepage = "https://tahoe-lafs.org/trac/pycryptopp"; 39 description = "Python wrappers for the Crypto++ library"; 40 license = licenses.gpl2Plus; 41 platforms = platforms.linux; 42 }; 43 44}