Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 70 lines 1.3 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, six 6, enum34 7, decorator 8, nose 9, krb5Full 10, darwin 11, isPy27 12, parameterized 13, shouldbe 14, cython 15, python 16, k5test 17}: 18 19buildPythonPackage rec { 20 pname = "gssapi"; 21 version = "1.6.2"; 22 23 src = fetchFromGitHub { 24 owner = "pythongssapi"; 25 repo = "python-${pname}"; 26 rev = "v${version}"; 27 sha256 = "195x3zqzyv491i9hf7l4asmic5pb2w3l1r7bps89651wkb3mrz1l"; 28 }; 29 30 # It's used to locate headers 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace "get_output('krb5-config gssapi --prefix')" "'${lib.getDev krb5Full}'" 34 ''; 35 36 nativeBuildInputs = [ 37 cython 38 krb5Full 39 ]; 40 41 propagatedBuildInputs = [ 42 decorator 43 six 44 ] ++ lib.optional isPy27 enum34; 45 46 buildInputs = lib.optionals stdenv.isDarwin [ 47 darwin.apple_sdk.frameworks.GSS 48 ]; 49 50 checkInputs = [ 51 k5test 52 nose 53 parameterized 54 shouldbe 55 six 56 ]; 57 58 doCheck = !stdenv.isDarwin; # many failures on darwin 59 60 checkPhase = '' 61 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" 62 ${python.interpreter} setup.py nosetests 63 ''; 64 65 meta = with lib; { 66 homepage = "https://pypi.python.org/pypi/gssapi"; 67 description = "Python GSSAPI Wrapper"; 68 license = licenses.mit; 69 }; 70}