2019-08-05 11:40:15 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, enum34
|
|
|
|
, decorator
|
|
|
|
, nose
|
|
|
|
, krb5Full
|
|
|
|
, darwin
|
|
|
|
, isPy27
|
|
|
|
, parameterized
|
|
|
|
, shouldbe
|
|
|
|
, cython
|
|
|
|
, python
|
|
|
|
, k5test
|
|
|
|
}:
|
2017-12-14 21:50:28 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2019-08-20 11:31:08 +01:00
|
|
|
version = "1.6.1";
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pythongssapi";
|
|
|
|
repo = "python-${pname}";
|
|
|
|
rev = "v${version}";
|
2019-08-20 11:31:08 +01:00
|
|
|
sha256 = "0n13vb3v50vr04vrnql2w00gri0gcf08i0pr0q2p4w8scbsw7kjk";
|
2017-12-14 21:50:28 +00:00
|
|
|
};
|
|
|
|
|
2017-12-24 10:08:30 +00:00
|
|
|
# It's used to locate headers
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'"
|
|
|
|
'';
|
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
krb5Full
|
|
|
|
];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
decorator
|
|
|
|
six
|
|
|
|
] ++ lib.optional isPy27 enum34;
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.GSS
|
|
|
|
];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
checkInputs = [
|
|
|
|
k5test
|
|
|
|
nose
|
|
|
|
parameterized
|
|
|
|
shouldbe
|
|
|
|
six
|
|
|
|
];
|
2019-02-15 09:08:27 +00:00
|
|
|
|
2019-08-05 16:56:50 +01:00
|
|
|
doCheck = !stdenv.isDarwin; # many failures on darwin
|
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
checkPhase = ''
|
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
|
|
|
${python.interpreter} setup.py nosetests
|
|
|
|
'';
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
meta = with lib; {
|
2017-12-14 21:50:28 +00:00
|
|
|
homepage = https://pypi.python.org/pypi/gssapi;
|
|
|
|
description = "Python GSSAPI Wrapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|