1{ lib
2, attrs
3, buildPythonPackage
4, cryptography
5, fetchFromGitHub
6, idna
7, ipaddress
8, pyasn1
9, pyasn1-modules
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "service-identity";
16 version = "21.1.0";
17
18 src = fetchFromGitHub {
19 owner = "pyca";
20 repo = pname;
21 rev = version;
22 sha256 = "sha256-pWc2rU3ULqEukMhd1ySY58lTm3s8f/ayQ7CY4nG24AQ=";
23 };
24
25 propagatedBuildInputs = [
26 attrs
27 cryptography
28 idna
29 pyasn1
30 pyasn1-modules
31 ] ++ lib.optionals (pythonOlder "3.3") [
32 ipaddress
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "service_identity" ];
40
41 meta = with lib; {
42 description = "Service identity verification for pyOpenSSL";
43 homepage = "https://service-identity.readthedocs.io";
44 license = licenses.mit;
45 maintainers = with maintainers; [ fab ];
46 };
47}