about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pem/default.nix
blob: f4608995dd73c6b00f851296a26837169f67fc91 (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
52
53
54
55
56
57
58
{ lib
, buildPythonPackage
, certifi
, cryptography
, fetchFromGitHub
, hatch-fancy-pypi-readme
, hatch-vcs
, hatchling
, pretend
, pyopenssl
, pytestCheckHook
, pythonOlder
, twisted
}:

buildPythonPackage rec {
  pname = "pem";
  version = "23.1.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "hynek";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-rVYlnvISGugh9qvf3mdrIyELmeOUU4g6291HeoMkoQc=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    hatchling
    hatch-fancy-pypi-readme
    hatch-vcs
  ];

  nativeCheckInputs = [
    certifi
    cryptography
    pretend
    pyopenssl
    pytestCheckHook
    twisted
  ] ++ twisted.optional-dependencies.tls;

  pythonImportsCheck = [
    "pem"
  ];

  meta = with lib; {
    description = "Easy PEM file parsing in Python";
    homepage = "https://pem.readthedocs.io/";
    changelog = "https://github.com/hynek/pem/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ nyanotech ];
  };
}