2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, buildPythonPackage
|
|
|
|
, six
|
|
|
|
, enum34
|
|
|
|
, pyasn1
|
|
|
|
, cryptography
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pgpy";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.5.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SecurityInnovation";
|
|
|
|
repo = "PGPy";
|
2021-05-20 23:08:51 +00:00
|
|
|
rev = "v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-iuga6vZ7eOl/wNVuLnhDVeUPJPibGm8iiyTC4dOA7A4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes the issue in https://github.com/SecurityInnovation/PGPy/issues/402.
|
|
|
|
# by pulling in https://github.com/SecurityInnovation/PGPy/pull/403.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "crytography-38-support.patch";
|
|
|
|
url = "https://github.com/SecurityInnovation/PGPy/commit/d84597eb8417a482433ff51dc6b13060d4b2e686.patch";
|
|
|
|
hash = "sha256-dviXCSGtPguROHVZ1bt/eEfpATjehm8jZ5BeVjxdb8U=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
pyasn1
|
|
|
|
cryptography
|
2021-05-20 23:08:51 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.4") [
|
|
|
|
enum34
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabledTests = [
|
|
|
|
# assertions contains extra: IDEA has been deprecated
|
|
|
|
"test_encrypt_bad_cipher"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/SecurityInnovation/PGPy";
|
|
|
|
description = "Pretty Good Privacy for Python 2 and 3";
|
|
|
|
longDescription = ''
|
|
|
|
PGPy is a Python (2 and 3) library for implementing Pretty Good Privacy
|
|
|
|
into Python programs, conforming to the OpenPGP specification per RFC
|
|
|
|
4880.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd3;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ eadwu dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|