Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 46 lines 1.1 kB view raw
1{ stdenv 2, fetchpatch 3, buildPythonPackage 4, fetchPypi 5, swig2 6, openssl 7, typing 8}: 9 10 11buildPythonPackage rec { 12 version = "0.35.2"; 13 pname = "M2Crypto"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"; 18 }; 19 20 patches = [ 21 (fetchpatch { 22 url = "https://github.com/void-linux/void-packages/raw/7946d12eb3d815e5ecd4578f1a6133d948694370/srcpkgs/python-M2Crypto/patches/libressl.patch"; 23 sha256 = "0z5qnkndg6ma5f5qqrid5m95i9kybsr000v3fdy1ab562kf65a27"; 24 }) 25 ]; 26 patchFlags = "-p0"; 27 28 nativeBuildInputs = [ swig2 ]; 29 buildInputs = [ swig2 openssl ]; 30 31 propagatedBuildInputs = [ typing ]; 32 33 preConfigure = '' 34 substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${openssl.dev}'" 35 ''; 36 37 doCheck = false; # another test that depends on the network. 38 39 meta = with stdenv.lib; { 40 description = "A Python crypto and SSL toolkit"; 41 homepage = https://gitlab.com/m2crypto/m2crypto; 42 license = licenses.mit; 43 maintainers = with maintainers; [ andrew-d ]; 44 }; 45 46}