2018-10-15 23:16:23 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-11-24 14:51:51 +01:00
|
|
|
, swig2
|
|
|
|
, openssl
|
|
|
|
, typing
|
2018-10-15 23:16:23 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-11-04 11:35:05 +01:00
|
|
|
version = "0.30.1";
|
2018-10-15 23:16:23 +02:00
|
|
|
pname = "M2Crypto";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-11-04 11:35:05 +01:00
|
|
|
sha256 = "a1b2751cdadc6afac3df8a5799676b7b7c67a6ad144bb62d38563062e7cd3fc6";
|
2018-10-15 23:16:23 +02:00
|
|
|
};
|
|
|
|
|
2018-11-24 14:51:51 +01:00
|
|
|
buildInputs = [ swig2 openssl ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ typing ];
|
2018-10-15 23:16:23 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
2018-11-24 14:51:51 +01:00
|
|
|
substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${openssl.dev}'"
|
2018-10-15 23:16:23 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # another test that depends on the network.
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Python crypto and SSL toolkit";
|
|
|
|
homepage = http://chandlerproject.org/Projects/MeTooCrypto;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|