2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-04-26 19:14:03 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, cryptography
|
2021-04-26 19:14:03 +00:00
|
|
|
, futures ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyopenssl
|
|
|
|
, service-identity
|
2021-04-26 19:14:03 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, idna
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trustme";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "1fde1dd27052ab5e5693e1fbe3ba091a6496daf1125409d73232561145fca369";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pyopenssl
|
|
|
|
service-identity
|
2021-04-26 19:14:03 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
idna
|
|
|
|
] ++ lib.optionals (!isPy3k) [
|
|
|
|
futures
|
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
# aarch64-darwin forbids W+X memory, but this tests depends on it:
|
|
|
|
# * https://github.com/pyca/pyopenssl/issues/873
|
|
|
|
disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
|
|
|
"test_pyopenssl_end_to_end"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "High quality TLS certs while you wait, for the discerning tester";
|
|
|
|
homepage = "https://github.com/python-trio/trustme";
|
|
|
|
license = with lib.licenses; [ mit asl20 ];
|
|
|
|
maintainers = with lib.maintainers; [ catern ];
|
|
|
|
};
|
|
|
|
}
|