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
|
|
|
|
, darwin
|
|
|
|
, parameterized
|
|
|
|
, shouldbe
|
|
|
|
, cython
|
|
|
|
, python
|
|
|
|
, k5test
|
|
|
|
}:
|
2017-12-14 21:50:28 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2020-09-13 00:24:14 +01:00
|
|
|
version = "1.6.9";
|
|
|
|
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-09-13 00:24:14 +01:00
|
|
|
sha256 = "1shm3pc0l2r91qadkpq4bx45my0165nw3kdcp0gw4lk50z215hag";
|
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 [
|
|
|
|
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
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|