2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, setuptools
|
|
|
|
, gnupg
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "python-gnupg";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "0.5.1";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-VnS61Ok4dsCw0xl+MU1/lC05AYvzHiuDP2eIpoE8P7g=";
|
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
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|