1{ lib
2, buildPythonPackage
3, fetchPypi
4, openssl
5, parameterized
6, pytestCheckHook
7, pythonOlder
8, swig2
9}:
10
11buildPythonPackage rec {
12 pname = "m2crypto";
13 version = "0.39.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "M2Crypto";
20 inherit version;
21 hash = "sha256-JMD0cTWLixmtTIqp2hLoaAMLZcH9syedAG32DJUBM4o=";
22 };
23
24 nativeBuildInputs = [
25 swig2
26 openssl
27 ];
28
29 buildInputs = [
30 openssl
31 parameterized
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "M2Crypto"
40 ];
41
42 meta = with lib; {
43 description = "A Python crypto and SSL toolkit";
44 homepage = "https://gitlab.com/m2crypto/m2crypto";
45 changelog = "https://gitlab.com/m2crypto/m2crypto/-/blob/${version}/CHANGES";
46 license = licenses.mit;
47 maintainers = with maintainers; [ andrew-d ];
48 };
49}