2019-08-05 06:40:15 -04:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2020-09-13 00:24:14 +01:00
|
|
|
pythonOlder,
|
2019-08-05 06:40:15 -04:00
|
|
|
fetchFromGitHub,
|
2024-05-22 16:01:06 +02:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
# build-system
|
|
|
|
cython,
|
|
|
|
setuptools,
|
2024-05-22 16:01:06 +02:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
# dependencies
|
|
|
|
decorator,
|
2024-05-22 16:01:06 +02:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
# native dependencies
|
2024-08-08 15:02:30 -04:00
|
|
|
krb5-c, # C krb5 library, not PyPI krb5
|
2024-05-22 16:01:06 +02:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
# tests
|
2019-08-05 06:40:15 -04:00
|
|
|
parameterized,
|
|
|
|
k5test,
|
2024-05-12 14:38:09 +02:00
|
|
|
pytestCheckHook,
|
2019-08-05 06:40:15 -04:00
|
|
|
}:
|
2017-12-14 13:50:28 -08:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2025-01-19 21:15:42 +01:00
|
|
|
version = "1.9.0";
|
2024-05-12 14:38:09 +02:00
|
|
|
pyproject = true;
|
|
|
|
|
2020-09-13 00:24:14 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-12-14 13:50:28 -08:00
|
|
|
|
2019-08-05 06:40:15 -04:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pythongssapi";
|
|
|
|
repo = "python-${pname}";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2025-01-19 21:15:42 +01:00
|
|
|
hash = "sha256-Y53HoLcamoFIrwZtNcL1BOrzBjRD09mT3AiS0QUT7dY=";
|
2017-12-14 13:50:28 -08:00
|
|
|
};
|
|
|
|
|
2017-12-24 11:08:30 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-08-08 15:02:30 -04:00
|
|
|
--replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5-c}"'
|
2017-12-24 11:08:30 +01:00
|
|
|
'';
|
|
|
|
|
2023-07-29 23:14:34 +00:00
|
|
|
env = lib.optionalAttrs (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
|
|
|
|
GSSAPI_SUPPORT_DETECT = "false";
|
|
|
|
};
|
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
build-system = [
|
2019-08-05 06:40:15 -04:00
|
|
|
cython
|
2024-08-08 15:02:30 -04:00
|
|
|
krb5-c
|
2024-05-12 14:38:09 +02:00
|
|
|
setuptools
|
2019-08-05 06:40:15 -04:00
|
|
|
];
|
2017-12-14 13:50:28 -08:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
dependencies = [ decorator ];
|
2017-12-14 13:50:28 -08:00
|
|
|
|
2024-05-22 14:34:43 +02:00
|
|
|
# k5test is marked as broken on darwin
|
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2019-08-05 06:40:15 -04:00
|
|
|
k5test
|
|
|
|
parameterized
|
2024-05-12 14:38:09 +02:00
|
|
|
pytestCheckHook
|
2019-08-05 06:40:15 -04:00
|
|
|
];
|
2019-02-15 10:08:27 +01:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
preCheck = ''
|
|
|
|
mv gssapi/tests $TMPDIR/
|
|
|
|
pushd $TMPDIR
|
|
|
|
'';
|
2020-09-13 00:19:05 +01:00
|
|
|
|
2024-05-12 14:38:09 +02:00
|
|
|
postCheck = ''
|
|
|
|
popd
|
2019-08-05 06:40:15 -04:00
|
|
|
'';
|
2024-05-12 14:38:09 +02:00
|
|
|
|
2020-09-13 00:19:05 +01:00
|
|
|
pythonImportsCheck = [ "gssapi" ];
|
2017-12-14 13:50:28 -08:00
|
|
|
|
2019-08-05 06:40:15 -04:00
|
|
|
meta = with lib; {
|
2020-02-24 08:23:01 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/gssapi";
|
2017-12-14 13:50:28 -08:00
|
|
|
description = "Python GSSAPI Wrapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|