18 buildPythonPackage rec {
21 format = "setuptools";
22 disabled = pythonOlder "3.6";
24 src = fetchFromGitHub {
25 owner = "pythongssapi";
26 repo = "python-${pname}";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-H1JfdvxJvX5dmC9aTqIOkjAqFEL44KoUXEhoYj2uRY8=";
31 # It's used to locate headers
33 substituteInPlace setup.py \
34 --replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5}"'
37 env = lib.optionalAttrs (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
38 GSSAPI_SUPPORT_DETECT = "false";
46 propagatedBuildInputs = [
51 buildInputs = lib.optionals stdenv.isDarwin [
63 doCheck = pythonOlder "3.8" # `shouldbe` not available
64 && !stdenv.isDarwin; # many failures on darwin
66 # skip tests which fail possibly due to be an upstream issue (see
67 # https://github.com/pythongssapi/python-gssapi/issues/220)
69 # some tests don't respond to being disabled through nosetests -x
70 echo $'\ndel CredsTestCase.test_add_with_impersonate' >> gssapi/tests/test_high_level.py
71 echo $'\ndel TestBaseUtilities.test_acquire_creds_impersonate_name' >> gssapi/tests/test_raw.py
72 echo $'\ndel TestBaseUtilities.test_add_cred_impersonate_name' >> gssapi/tests/test_raw.py
74 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
75 nosetests -e 'ext_test_\d.*'
77 pythonImportsCheck = [ "gssapi" ];
80 homepage = "https://pypi.python.org/pypi/gssapi";
81 description = "Python GSSAPI Wrapper";
82 license = licenses.mit;