Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / python-gnupg / default.nix
blobfe68676110709241a52e0c0d5234f4e735608415
1 { lib, buildPythonPackage, fetchPypi, gnupg }:
3 buildPythonPackage rec {
4   pname   = "python-gnupg";
5   version = "0.4.6";
7   src = fetchPypi {
8     inherit pname version;
9     sha256 = "3aa0884b3bd414652c2385b9df39e7b87272c2eca1b8fcc3089bc9e58652019a";
10   };
12   # Let's make the library default to our gpg binary
13   patchPhase = ''
14     substituteInPlace gnupg.py \
15     --replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
16     substituteInPlace test_gnupg.py \
17     --replace "gpgbinary=GPGBINARY" "gpgbinary='${gnupg}/bin/gpg'" \
18     --replace "test_search_keys" "disabled__test_search_keys"
19   '';
21   meta = with lib; {
22     description = "A wrapper for the Gnu Privacy Guard";
23     homepage    = "https://pypi.python.org/pypi/python-gnupg";
24     license     = licenses.bsd3;
25     maintainers = with maintainers; [ copumpkin ];
26     platforms   = platforms.unix;
27   };