2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
setuptools,
|
|
|
|
gnupg,
|
|
|
|
pytestCheckHook,
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "python-gnupg";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "0.5.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-KQ2N25zWPfls/pKEubJl8Z/W4UXlWC3Fj9cnHwJtCkc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace gnupg.py \
|
2022-08-12 12:06:08 +00:00
|
|
|
--replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace test_gnupg.py \
|
2022-08-12 12:06:08 +00:00
|
|
|
--replace "os.environ.get('GPGBINARY', 'gpg')" "os.environ.get('GPGBINARY', '${gnupg}/bin/gpg')"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# network access
|
|
|
|
"test_search_keys"
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pythonImportsCheck = [ "gnupg" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
description = "API for the GNU Privacy Guard (GnuPG)";
|
|
|
|
homepage = "https://github.com/vsajip/python-gnupg";
|
2023-08-04 22:07:22 +00:00
|
|
|
changelog = "https://github.com/vsajip/python-gnupg/releases/tag/${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|