1{ lib, buildPythonPackage, fetchPypi, gnupg }:
2
3buildPythonPackage rec {
4 pname = "python-gnupg";
5 version = "0.4.7";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "2061f56b1942c29b92727bf9aecbd3cea3893acc9cccbdc7eb4604285efe4ac7";
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 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}