1{ stdenv, pkgs, lib, buildPythonPackage, fetchPypi, six, enum34, decorator, 2nose, shouldbe, gss, krb5Full, which, darwin }: 3 4buildPythonPackage rec { 5 pname = "gssapi"; 6 version = "1.5.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "76c9fda88a7178f41bf6454a06d64054c56b46f0dcbc73307f2e57bb8c25d8cc"; 11 }; 12 13 # It's used to locate headers 14 postPatch = '' 15 substituteInPlace setup.py \ 16 --replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'" 17 ''; 18 19 LD_LIBRARY_PATH = "${pkgs.krb5Full}/lib"; 20 21 buildInputs = [ krb5Full which nose shouldbe ] 22 ++ ( if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.GSS ] else [ gss ] ); 23 24 propagatedBuildInputs = [ decorator enum34 six ]; 25 26 doCheck = false; # No such file or directory: '/usr/sbin/kadmin.local' 27 28 meta = with stdenv.lib; { 29 homepage = https://pypi.python.org/pypi/gssapi; 30 description = "Python GSSAPI Wrapper"; 31 license = licenses.mit; 32 }; 33}