2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, gnupg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "python-gnupg";
|
|
|
|
version = "0.4.9";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-qqdIeVVyWRqvEntKyJhWhPNnP/grOfNwyDawBuaPxTc=";
|
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-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";
|
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|