1{ stdenv, buildPythonPackage, fetchPypi, gnupg1 }: 2 3buildPythonPackage rec { 4 name = "${pname}-${version}"; 5 pname = "python-gnupg"; 6 version = "0.4.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "06hfw9cmiw5306fyisp3kzg1hww260qzip829g7y7pj1mwpb0izg"; 11 }; 12 13 propagatedBuildInputs = [ gnupg1 ]; 14 15 # Let's make the library default to our gpg binary 16 patchPhase = '' 17 substituteInPlace gnupg.py \ 18 --replace "gpgbinary='gpg'" "gpgbinary='${gnupg1}/bin/gpg'" 19 substituteInPlace test_gnupg.py \ 20 --replace "gpgbinary=GPGBINARY" "gpgbinary='${gnupg1}/bin/gpg'" 21 ''; 22 23 meta = with stdenv.lib; { 24 description = "A wrapper for the Gnu Privacy Guard"; 25 homepage = https://pypi.python.org/pypi/python-gnupg; 26 license = licenses.bsd3; 27 maintainers = with maintainers; [ copumpkin ]; 28 platforms = platforms.unix; 29 }; 30}