Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-gnupg / default.nix
blob95ebc2b954e8e10ae0f7444ed489a29ee048523f
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , setuptools
5 , gnupg
6 , pytestCheckHook
7 }:
9 buildPythonPackage rec {
10   pname = "python-gnupg";
11   version = "0.5.2";
13   format = "pyproject";
15   src = fetchPypi {
16     inherit pname version;
17     hash = "sha256-AdgBOTHJ+j9Fgku+pwVMA9bhHyWKcufghuFo28uRhUw=";
18   };
20   postPatch = ''
21     substituteInPlace gnupg.py \
22       --replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
23     substituteInPlace test_gnupg.py \
24       --replace "os.environ.get('GPGBINARY', 'gpg')" "os.environ.get('GPGBINARY', '${gnupg}/bin/gpg')"
25   '';
27   nativeBuildInputs = [
28     setuptools
29   ];
31   nativeCheckInputs = [
32     pytestCheckHook
33   ];
35   disabledTests = [
36     # network access
37     "test_search_keys"
38   ];
40   pythonImportsCheck = [ "gnupg" ];
42   meta = with lib; {
43     description = "API for the GNU Privacy Guard (GnuPG)";
44     homepage = "https://github.com/vsajip/python-gnupg";
45     changelog = "https://github.com/vsajip/python-gnupg/releases/tag/${version}";
46     license = licenses.bsd3;
47     maintainers = with maintainers; [ copumpkin ];
48   };