summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pgpy-dtc/default.nix
blob: a57290cd7f8d5fd1ed9b4e94ad775bed31f09c4a (plain)
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
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  setuptools,
  pyasn1,
  cryptography,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pgpy-dtc";
  version = "0.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "DigitalTrustCenter";
    repo = "PGPy_dtc";
    tag = version;
    hash = "sha256-0zv2gtgp/iGDQescaDpng1gqbgjv7iXFvtwEt3YIPy4=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pyasn1
    cryptography
  ];

  patches = [
    # NOTE: This is the same patch file as Fix-compat-with-current-cryptography.patch
    #       from the pgpy packaging, with the base directory modified for pgpy-dtc.
    # https://github.com/SecurityInnovation/PGPy/pull/474
    ./Fix-compat-with-current-cryptography.patch
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pgpy_dtc" ];

  meta = {
    homepage = "https://github.com/DigitalTrustCenter/PGPy_dtc";
    changelog = "https://github.com/DigitalTrustCenter/PGPy_dtc/releases/tag/${src.tag}";
    description = "Pretty Good Privacy for Python";
    license = lib.licenses.eupl12;
    maintainers = with lib.maintainers; [ networkexception ];
  };
}