1{ stdenv, buildPythonPackage, fetchPypi, gnupg }:
2
3buildPythonPackage rec {
4 pname = "python-gnupg";
5 version = "0.4.6";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "3aa0884b3bd414652c2385b9df39e7b87272c2eca1b8fcc3089bc9e58652019a";
10 };
11
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 '';
20
21 meta = with stdenv.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 };
28}