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-12 14:38:09 +02:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, cython
|
2022-11-18 02:13:16 +01:00
|
|
|
, krb5
|
2024-05-12 14:38:09 +02:00
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, decorator
|
|
|
|
|
|
|
|
# native dependencies
|
2021-03-08 01:30:48 +01:00
|
|
|
, GSS
|
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";
|
2023-09-15 14:06:15 +02:00
|
|
|
version = "1.8.3";
|
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}";
|
2022-12-30 20:13:16 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-09-15 14:06:15 +02:00
|
|
|
hash = "sha256-H1JfdvxJvX5dmC9aTqIOkjAqFEL44KoUXEhoYj2uRY8=";
|
2017-12-14 13:50:28 -08:00
|
|
|
};
|
|
|
|
|
2017-12-24 11:08:30 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2022-11-18 02:13:16 +01:00
|
|
|
--replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5}"'
|
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
|
2022-11-18 02:13:16 +01:00
|
|
|
krb5
|
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 = [
|
2019-08-05 06:40:15 -04:00
|
|
|
decorator
|
2020-09-13 00:24:14 +01:00
|
|
|
];
|
2017-12-14 13:50:28 -08:00
|
|
|
|
2019-08-05 06:40:15 -04:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2021-03-08 01:30:48 +01:00
|
|
|
GSS
|
2019-08-05 06:40:15 -04:00
|
|
|
];
|
2017-12-14 13:50:28 -08:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|