2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-26 13:06:08 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-10-28 21:15:34 +00:00
|
|
|
, fetchpatch
|
2018-10-26 13:06:08 +00:00
|
|
|
, isPy3k
|
|
|
|
, setuptoolsDarcs
|
|
|
|
, darcsver
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycryptopp";
|
2018-11-04 10:35:11 +00:00
|
|
|
version = "0.7.1.869544967005693312591928092448767568728501330214";
|
2019-02-12 02:28:50 +00:00
|
|
|
disabled = isPy3k; # see https://bitbucket.org/pypy/pypy/issue/1190/
|
2018-10-26 13:06:08 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-28 21:15:34 +00:00
|
|
|
sha256 = "17v98bhh3nd6rkw0kk1xmnc9vm5ql0fji4in2wyd4zlvlfhmgb88";
|
2018-10-26 13:06:08 +00:00
|
|
|
};
|
|
|
|
|
2019-10-28 21:15:34 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "pycryptopp-cryptopp_6.patch";
|
|
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/api_change.patch?h=pycryptopp&id=55f2973d6ca5e9e70438f2eadb7fb575b1a5048d";
|
|
|
|
sha256 = "0lvl2d32d2vkb0v6d39p9whda5bdrmlsjd41zy0x0znqm53a9i99";
|
|
|
|
stripLen = 1;
|
|
|
|
extraPrefix = "src/";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-10-26 13:06:08 +00:00
|
|
|
# Prefer crypto++ library from the Nix store over the one that's included
|
|
|
|
# in the pycryptopp distribution.
|
|
|
|
preConfigure = "export PYCRYPTOPP_DISABLE_EMBEDDED_CRYPTOPP=1";
|
|
|
|
|
|
|
|
buildInputs = [ setuptoolsDarcs darcsver pkgs.cryptopp ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-28 21:15:34 +00:00
|
|
|
homepage = "https://tahoe-lafs.org/trac/pycryptopp";
|
2018-10-26 13:06:08 +00:00
|
|
|
description = "Python wrappers for the Crypto++ library";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|