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