diff --git a/pkgs/development/python-modules/gssapi/default.nix b/pkgs/development/python-modules/gssapi/default.nix index 14d27e7442e2..f470bed2fdbb 100644 --- a/pkgs/development/python-modules/gssapi/default.nix +++ b/pkgs/development/python-modules/gssapi/default.nix @@ -1,13 +1,30 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, six, enum34, decorator, -nose, gss, krb5Full, darwin }: +{ stdenv +, lib +, buildPythonPackage +, fetchFromGitHub +, six +, enum34 +, decorator +, nose +, krb5Full +, darwin +, isPy27 +, parameterized +, shouldbe +, cython +, python +, k5test +}: buildPythonPackage rec { pname = "gssapi"; - version = "1.5.1"; + version = "1.6.0"; - src = fetchPypi { - inherit pname version; - sha256 = "76c9fda88a7178f41bf6454a06d64054c56b46f0dcbc73307f2e57bb8c25d8cc"; + src = fetchFromGitHub { + owner = "pythongssapi"; + repo = "python-${pname}"; + rev = "v${version}"; + sha256 = "1chmxhjbs39paaxlfsdrr13v4zvv94ijvhxasdphxlxkqlycbm4a"; }; # It's used to locate headers @@ -16,18 +33,34 @@ buildPythonPackage rec { --replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'" ''; - LD_LIBRARY_PATH = "${krb5Full}/lib"; + nativeBuildInputs = [ + cython + krb5Full + ]; - nativeBuildInputs = [ krb5Full ] - ++ ( if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.GSS ] else [ gss ] ); + propagatedBuildInputs = [ + decorator + six + ] ++ lib.optional isPy27 enum34; - propagatedBuildInputs = [ decorator enum34 six ]; + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.GSS + ]; - checkInputs = [ nose ]; + checkInputs = [ + k5test + nose + parameterized + shouldbe + six + ]; - doCheck = false; # No such file or directory: '/usr/sbin/kadmin.local' + checkPhase = '' + export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" + ${python.interpreter} setup.py nosetests + ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://pypi.python.org/pypi/gssapi; description = "Python GSSAPI Wrapper"; license = licenses.mit; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 37cf7ea00f9a..868afce03cb9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -606,7 +606,9 @@ in { gsd = callPackage ../development/python-modules/gsd { }; - gssapi = callPackage ../development/python-modules/gssapi { }; + gssapi = callPackage ../development/python-modules/gssapi { + inherit (pkgs) darwin krb5Full; + }; guestfs = callPackage ../development/python-modules/guestfs { };