summary refs log tree commit diff
path: root/pkgs/development/python-modules/trustme/default.nix
blob: a959bef16826fd6283e6535f0f9c3b34041d76e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, isPy3k
, cryptography
, futures ? null
, pyopenssl
, service-identity
, pytestCheckHook
, idna
}:

buildPythonPackage rec {
  pname = "trustme";
  version = "0.7.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1fde1dd27052ab5e5693e1fbe3ba091a6496daf1125409d73232561145fca369";
  };

  checkInputs = [
    pyopenssl
    service-identity
    pytestCheckHook
  ];

  propagatedBuildInputs = [
    cryptography
    idna
  ] ++ lib.optionals (!isPy3k) [
    futures
  ];

  # 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"
  ];

  # 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 ];
  };
}