1{ stdenv, lib, buildPythonPackage, fetchPypi, six, enum34, decorator,
2nose, gss, krb5Full, 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 = "${krb5Full}/lib";
20
21 nativeBuildInputs = [ krb5Full ]
22 ++ ( if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.GSS ] else [ gss ] );
23
24 propagatedBuildInputs = [ decorator enum34 six ];
25
26 checkInputs = [ nose ];
27
28 doCheck = false; # No such file or directory: '/usr/sbin/kadmin.local'
29
30 meta = with stdenv.lib; {
31 homepage = https://pypi.python.org/pypi/gssapi;
32 description = "Python GSSAPI Wrapper";
33 license = licenses.mit;
34 };
35}