depot/third_party/nixpkgs/pkgs/development/python-modules/python-gnupg/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

29 lines
791 B
Nix

{ lib, buildPythonPackage, fetchPypi, gnupg }:
buildPythonPackage rec {
pname = "python-gnupg";
version = "0.4.9";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-qqdIeVVyWRqvEntKyJhWhPNnP/grOfNwyDawBuaPxTc=";
};
postPatch = ''
substituteInPlace gnupg.py \
--replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
substituteInPlace test_gnupg.py \
--replace "os.environ.get('GPGBINARY', 'gpg')" "os.environ.get('GPGBINARY', '${gnupg}/bin/gpg')"
'';
pythonImportsCheck = [ "gnupg" ];
meta = with lib; {
description = "API for the GNU Privacy Guard (GnuPG)";
homepage = "https://github.com/vsajip/python-gnupg";
license = licenses.bsd3;
maintainers = with maintainers; [ copumpkin ];
};
}