2018-10-15 22:16:23 +01:00
|
|
|
{ stdenv
|
2019-02-07 10:01:42 +00:00
|
|
|
, fetchpatch
|
2018-10-15 22:16:23 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-11-24 13:51:51 +00:00
|
|
|
, swig2
|
|
|
|
, openssl
|
|
|
|
, typing
|
2018-10-15 22:16:23 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-07-11 18:46:09 +01:00
|
|
|
version = "0.35.2";
|
2018-10-15 22:16:23 +01:00
|
|
|
pname = "M2Crypto";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-11 18:46:09 +01:00
|
|
|
sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc";
|
2018-10-15 22:16:23 +01:00
|
|
|
};
|
|
|
|
|
2019-02-07 10:01:42 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/void-linux/void-packages/raw/7946d12eb3d815e5ecd4578f1a6133d948694370/srcpkgs/python-M2Crypto/patches/libressl.patch";
|
|
|
|
sha256 = "0z5qnkndg6ma5f5qqrid5m95i9kybsr000v3fdy1ab562kf65a27";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
patchFlags = "-p0";
|
|
|
|
|
2019-03-07 23:37:39 +00:00
|
|
|
nativeBuildInputs = [ swig2 ];
|
2018-11-24 13:51:51 +00:00
|
|
|
buildInputs = [ swig2 openssl ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ typing ];
|
2018-10-15 22:16:23 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2018-11-24 13:51:51 +00:00
|
|
|
substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${openssl.dev}'"
|
2018-10-15 22:16:23 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # another test that depends on the network.
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Python crypto and SSL toolkit";
|
2019-03-07 22:22:33 +00:00
|
|
|
homepage = https://gitlab.com/m2crypto/m2crypto;
|
2018-10-15 22:16:23 +01:00
|
|
|
license = licenses.mit;
|
2019-02-07 10:01:42 +00:00
|
|
|
maintainers = with maintainers; [ andrew-d ];
|
2018-10-15 22:16:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|