1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
78 lines
1.3 KiB
Nix
78 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildPythonPackage,
|
|
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;
|
|
|
|
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;
|
|
};
|
|
}
|