2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
openssl,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
swig,
|
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";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ swig ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
env =
|
|
|
|
{
|
2024-09-26 11:04:55 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
|
2024-05-15 15:35:15 +00:00
|
|
|
"-Wno-error=implicit-function-declaration"
|
|
|
|
"-Wno-error=incompatible-pointer-types"
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
|
|
|
CPP = "${stdenv.cc.targetPrefix}cpp";
|
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
2024-05-15 15:35:15 +00:00
|
|
|
openssl
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "M2Crypto" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python crypto and SSL toolkit";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|