1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5, pkgs
6}:
7
8buildPythonPackage rec {
9 pname = "python-gnutls";
10 version = "3.1.2";
11
12 # https://github.com/AGProjects/python-gnutls/issues/2
13 disabled = isPy3k;
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "28748e02a8035c31826152944e41217ebcc58ab7793ae5a22850cd23d3cfbbbe";
18 };
19
20 propagatedBuildInputs = [ pkgs.gnutls ];
21 patchPhase = ''
22 substituteInPlace gnutls/library/__init__.py --replace "/usr/local/lib" "${pkgs.gnutls.out}/lib"
23 '';
24
25 meta = with stdenv.lib; {
26 description = "Python wrapper for the GnuTLS library";
27 homepage = https://github.com/AGProjects/python-gnutls;
28 license = licenses.lgpl2;
29 };
30
31}