2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, gnupg }:
|
2017-07-18 22:37:56 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-07-16 12:59:30 +02:00
|
|
|
pname = "python-gnupg";
|
2022-08-24 05:28:37 +00:00
|
|
|
version = "0.5.0";
|
2022-07-16 12:59:30 +02:00
|
|
|
|
|
|
|
format = "pyproject";
|
2017-07-18 22:37:56 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-24 05:28:37 +00:00
|
|
|
sha256 = "sha256-cHWOOH/A4MS628s5T2GsvmizSXCo/tfg98iUaf4XkSo=";
|
2017-07-18 22:37:56 +01:00
|
|
|
};
|
|
|
|
|
2022-07-16 12:59:30 +02:00
|
|
|
postPatch = ''
|
2017-07-18 22:37:56 +01:00
|
|
|
substituteInPlace gnupg.py \
|
2022-07-16 12:59:30 +02:00
|
|
|
--replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
|
2017-07-18 22:37:56 +01:00
|
|
|
substituteInPlace test_gnupg.py \
|
2022-07-16 12:59:30 +02:00
|
|
|
--replace "os.environ.get('GPGBINARY', 'gpg')" "os.environ.get('GPGBINARY', '${gnupg}/bin/gpg')"
|
2017-07-18 22:37:56 +01:00
|
|
|
'';
|
|
|
|
|
2022-07-16 12:59:30 +02:00
|
|
|
pythonImportsCheck = [ "gnupg" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-07-16 12:59:30 +02:00
|
|
|
description = "API for the GNU Privacy Guard (GnuPG)";
|
|
|
|
homepage = "https://github.com/vsajip/python-gnupg";
|
|
|
|
license = licenses.bsd3;
|
2017-07-18 22:37:56 +01:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|