Files
nixpkgs/pkgs/development/python-modules/gssapi/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

81 lines
1.4 KiB
Nix

{
stdenv,
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
# build-system
cython,
setuptools,
# dependencies
decorator,
# native dependencies
krb5-c, # C krb5 library, not PyPI krb5
# tests
parameterized,
k5test,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "gssapi";
version = "1.9.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "pythongssapi";
repo = "python-${pname}";
tag = "v${version}";
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 = {
homepage = "https://pypi.python.org/pypi/gssapi";
description = "Python GSSAPI Wrapper";
license = lib.licenses.mit;
};
}