Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 pyasn1,
7 cryptography,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pgpy-dtc";
13 version = "0.1.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "DigitalTrustCenter";
18 repo = "PGPy_dtc";
19 tag = version;
20 hash = "sha256-0zv2gtgp/iGDQescaDpng1gqbgjv7iXFvtwEt3YIPy4=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 pyasn1
27 cryptography
28 ];
29
30 patches = [
31 # NOTE: This is the same patch file as Fix-compat-with-current-cryptography.patch
32 # from the pgpy packaging, with the base directory modified for pgpy-dtc.
33 # https://github.com/SecurityInnovation/PGPy/pull/474
34 ./Fix-compat-with-current-cryptography.patch
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "pgpy_dtc" ];
40
41 meta = {
42 homepage = "https://github.com/DigitalTrustCenter/PGPy_dtc";
43 changelog = "https://github.com/DigitalTrustCenter/PGPy_dtc/releases/tag/${src.tag}";
44 description = "Pretty Good Privacy for Python";
45 license = lib.licenses.eupl12;
46 maintainers = with lib.maintainers; [ networkexception ];
47 };
48}