nixpkgs/pkgs/development/python-modules/gssapi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.4 KiB
Nix
Raw Permalink Normal View History

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