pythonPackages.gnutls: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-15 23:37:42 -04:00 committed by Frederik Rietdijk
parent 74472620ce
commit 522a8a84d2
2 changed files with 32 additions and 16 deletions

View File

@ -0,0 +1,31 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, isPy3k
, pkgs
}:
buildPythonPackage rec {
pname = "python-gnutls";
version = "3.0.0";
# https://github.com/AGProjects/python-gnutls/issues/2
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1yrdxcj5rzvz8iglircz6icvyggz5fmdcd010n6w3j60yp4p84kc";
};
propagatedBuildInputs = [ pkgs.gnutls ];
patchPhase = ''
substituteInPlace gnutls/library/__init__.py --replace "/usr/local/lib" "${pkgs.gnutls.out}/lib"
'';
meta = with stdenv.lib; {
description = "Python wrapper for the GnuTLS library";
homepage = https://github.com/AGProjects/python-gnutls;
license = licenses.lgpl2;
};
}

View File

@ -1816,22 +1816,7 @@ in {
gnureadline = callPackage ../development/python-modules/gnureadline { };
gnutls = buildPythonPackage rec {
pname = "python-gnutls";
version = "3.0.0";
src = pkgs.fetchurl {
url = "mirror://pypi/p/python-gnutls/${pname}-${version}.tar.gz";
sha256 = "1yrdxcj5rzvz8iglircz6icvyggz5fmdcd010n6w3j60yp4p84kc";
};
# https://github.com/AGProjects/python-gnutls/issues/2
disabled = isPy3k;
propagatedBuildInputs = with self; [ pkgs.gnutls ];
patchPhase = ''
substituteInPlace gnutls/library/__init__.py --replace "/usr/local/lib" "${pkgs.gnutls.out}/lib"
'';
};
gnutls = callPackage ../development/python-modules/gnutls { };
gpy = callPackage ../development/python-modules/gpy { };