2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, openssl
|
2023-02-02 18:25:31 +00:00
|
|
|
, parameterized
|
2023-08-22 20:05:09 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, swig2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-08-22 20:05:09 +00:00
|
|
|
pname = "m2crypto";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.41.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-08-22 20:05:09 +00:00
|
|
|
pname = "M2Crypto";
|
|
|
|
inherit version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-OhNYx+6EkEbZF4Knd/F4a/AnocHVG1+vjxlDW/w/FJU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
swig2
|
|
|
|
openssl
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
parameterized
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [
|
|
|
|
"-Wno-error=implicit-function-declaration"
|
|
|
|
"-Wno-error=incompatible-pointer-types"
|
|
|
|
]);
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"M2Crypto"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python crypto and SSL toolkit";
|
|
|
|
homepage = "https://gitlab.com/m2crypto/m2crypto";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://gitlab.com/m2crypto/m2crypto/-/blob/${version}/CHANGES";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ andrew-d ];
|
|
|
|
};
|
|
|
|
}
|