2019-08-05 11:40:15 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
2020-09-13 00:24:14 +01:00
|
|
|
, pythonOlder
|
2019-08-05 11:40:15 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, decorator
|
|
|
|
, nose
|
|
|
|
, krb5Full
|
2021-03-08 00:30:48 +00:00
|
|
|
, GSS
|
2019-08-05 11:40:15 +01:00
|
|
|
, parameterized
|
|
|
|
, shouldbe
|
|
|
|
, cython
|
|
|
|
, python
|
|
|
|
, k5test
|
|
|
|
}:
|
2017-12-14 21:50:28 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2020-11-14 18:51:07 +00:00
|
|
|
version = "1.6.10";
|
2020-09-13 00:24:14 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
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}";
|
2020-11-14 18:51:07 +00:00
|
|
|
sha256 = "11w8z9ik6zzv3pw3319mz91cgbfkgx0mffxbapqnhilzij2jad4q";
|
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
|
2020-09-13 00:24:14 +01:00
|
|
|
];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2021-03-08 00:30:48 +00:00
|
|
|
GSS
|
2019-08-05 11:40:15 +01:00
|
|
|
];
|
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
|
|
|
|
2020-09-13 00:24:14 +01:00
|
|
|
doCheck = pythonOlder "3.8" # `shouldbe` not available
|
|
|
|
&& !stdenv.isDarwin; # many failures on darwin
|
2019-08-05 16:56:50 +01:00
|
|
|
|
2020-09-13 00:19:05 +01:00
|
|
|
# skip tests which fail possibly due to be an upstream issue (see
|
|
|
|
# https://github.com/pythongssapi/python-gssapi/issues/220)
|
2019-08-05 11:40:15 +01:00
|
|
|
checkPhase = ''
|
2020-09-13 00:19:05 +01:00
|
|
|
# some tests don't respond to being disabled through nosetests -x
|
|
|
|
echo $'\ndel CredsTestCase.test_add_with_impersonate' >> gssapi/tests/test_high_level.py
|
|
|
|
echo $'\ndel TestBaseUtilities.test_acquire_creds_impersonate_name' >> gssapi/tests/test_raw.py
|
|
|
|
echo $'\ndel TestBaseUtilities.test_add_cred_impersonate_name' >> gssapi/tests/test_raw.py
|
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
2020-09-13 00:19:05 +01:00
|
|
|
${python.interpreter} setup.py nosetests -e 'ext_test_\d.*'
|
2019-08-05 11:40:15 +01:00
|
|
|
'';
|
2020-09-13 00:19:05 +01:00
|
|
|
pythonImportsCheck = [ "gssapi" ];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 11:40:15 +01:00
|
|
|
meta = with lib; {
|
2020-02-24 08:23:01 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/gssapi";
|
2017-12-14 21:50:28 +00:00
|
|
|
description = "Python GSSAPI Wrapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|