2019-08-05 10:40:15 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, enum34
|
|
|
|
, decorator
|
|
|
|
, nose
|
|
|
|
, krb5Full
|
|
|
|
, darwin
|
|
|
|
, isPy27
|
|
|
|
, parameterized
|
|
|
|
, shouldbe
|
|
|
|
, cython
|
|
|
|
, python
|
|
|
|
, k5test
|
|
|
|
}:
|
2017-12-14 21:50:28 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gssapi";
|
2020-02-24 08:23:01 +00:00
|
|
|
version = "1.6.2";
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pythongssapi";
|
|
|
|
repo = "python-${pname}";
|
|
|
|
rev = "v${version}";
|
2020-02-24 08:23:01 +00:00
|
|
|
sha256 = "195x3zqzyv491i9hf7l4asmic5pb2w3l1r7bps89651wkb3mrz1l";
|
2017-12-14 21:50:28 +00:00
|
|
|
};
|
|
|
|
|
2017-12-24 10:08:30 +00:00
|
|
|
# It's used to locate headers
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'"
|
|
|
|
'';
|
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
krb5Full
|
|
|
|
];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
decorator
|
|
|
|
six
|
|
|
|
] ++ lib.optional isPy27 enum34;
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.GSS
|
|
|
|
];
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
checkInputs = [
|
|
|
|
k5test
|
|
|
|
nose
|
|
|
|
parameterized
|
|
|
|
shouldbe
|
|
|
|
six
|
|
|
|
];
|
2019-02-15 09:08:27 +00:00
|
|
|
|
2019-08-05 15:56:50 +00:00
|
|
|
doCheck = !stdenv.isDarwin; # many failures on darwin
|
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
|
|
|
${python.interpreter} setup.py nosetests
|
|
|
|
'';
|
2017-12-14 21:50:28 +00:00
|
|
|
|
2019-08-05 10:40:15 +00:00
|
|
|
meta = with lib; {
|
2020-02-24 08:23:01 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/gssapi";
|
2017-12-14 21:50:28 +00:00
|
|
|
description = "Python GSSAPI Wrapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|