1{ lib, pythonOlder, fetchFromGitHub, buildPythonPackage
2, six, enum34, pyasn1, cryptography, singledispatch ? null
3, pytestCheckHook }:
4
5buildPythonPackage rec {
6 pname = "pgpy";
7 version = "0.5.4";
8
9 src = fetchFromGitHub {
10 owner = "SecurityInnovation";
11 repo = "PGPy";
12 rev = "v${version}";
13 sha256 = "03pch39y3hi4ici6y6lvz0j0zram8dw2wvnmq1zyjy3vyvm1ms4a";
14 };
15
16 propagatedBuildInputs = [
17 six
18 pyasn1
19 cryptography
20 ] ++ lib.optionals (pythonOlder "3.4") [
21 singledispatch
22 enum34
23 ];
24
25 checkInputs = [
26 pytestCheckHook
27 ];
28
29 meta = with lib; {
30 homepage = "https://github.com/SecurityInnovation/PGPy";
31 description = "Pretty Good Privacy for Python 2 and 3";
32 longDescription = ''
33 PGPy is a Python (2 and 3) library for implementing Pretty Good Privacy
34 into Python programs, conforming to the OpenPGP specification per RFC
35 4880.
36 '';
37 license = licenses.bsd3;
38 maintainers = with maintainers; [ eadwu dotlambda ];
39 };
40}