nixpkgs/pkgs/development/python-modules/gssapi/default.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

80 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 = with lib; {
homepage = "https://pypi.python.org/pypi/gssapi";
description = "Python GSSAPI Wrapper";
license = licenses.mit;
};
}