2019-02-15 10:08:27 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, six, enum34, decorator,
|
|
|
|
nose, gss, krb5Full, darwin }:
|
2017-12-14 22:50:28 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2018-07-22 12:10:12 +02:00
|
|
|
version = "1.5.1";
|
2017-12-14 22:50:28 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 12:10:12 +02:00
|
|
|
sha256 = "76c9fda88a7178f41bf6454a06d64054c56b46f0dcbc73307f2e57bb8c25d8cc";
|
2017-12-14 22:50:28 +01:00
|
|
|
};
|
|
|
|
|
2017-12-24 11:08:30 +01:00
|
|
|
# It's used to locate headers
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'"
|
|
|
|
'';
|
|
|
|
|
2019-02-15 10:08:27 +01:00
|
|
|
LD_LIBRARY_PATH = "${krb5Full}/lib";
|
2017-12-14 22:50:28 +01:00
|
|
|
|
2019-02-15 10:08:27 +01:00
|
|
|
nativeBuildInputs = [ krb5Full ]
|
2017-12-14 22:50:28 +01:00
|
|
|
++ ( if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.GSS ] else [ gss ] );
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ decorator enum34 six ];
|
|
|
|
|
2019-02-15 10:08:27 +01:00
|
|
|
checkInputs = [ nose ];
|
|
|
|
|
2017-12-14 22:50:28 +01:00
|
|
|
doCheck = false; # No such file or directory: '/usr/sbin/kadmin.local'
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://pypi.python.org/pypi/gssapi;
|
|
|
|
description = "Python GSSAPI Wrapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|