19 buildPythonPackage rec {
24 inherit pname version;
25 hash = "sha256-nXTqsJNX/LwAglPcPZkmdYPfF+vDLN+nNdZaDFTrHzE=";
28 # Update this hash if bumping versions
29 jarHash = "sha256-x2KH6tnoG7sogtjrJvUaxy0PCEA8q/zneuI969oBOKo=";
30 skeinJar = callPackage ./skeinjar.nix { inherit pname version jarHash; };
32 propagatedBuildInputs = [
36 ] ++ lib.optionals (!pythonOlder "3.12") [ setuptools ];
37 buildInputs = [ grpcio-tools ];
40 # Ensure skein.jar exists skips the maven build in setup.py
42 ln -s ${skeinJar} skein/java/skein.jar
47 substituteInPlace skein/core.py --replace "'yarn'" "'${hadoop}/bin/yarn'" \
48 --replace "else 'java'" "else '${hadoop.jdk}/bin/java'"
49 # Remove vendorized versioneer
52 + lib.optionalString (!pythonOlder "3.12") ''
53 substituteInPlace skein/utils.py \
54 --replace-fail "distutils" "setuptools._distutils"
57 build-system = [ versioneer ];
59 pythonImportsCheck = [ "skein" ];
61 nativeCheckInputs = [ pytestCheckHook ];
62 # These tests require connecting to a YARN cluster. They could be done through NixOS tests later.
72 homepage = "https://jcristharif.com/skein";
73 description = "Tool and library for easily deploying applications on Apache YARN";
74 mainProgram = "skein";
75 license = lib.licenses.bsd3;
76 maintainers = with lib.maintainers; [
80 # https://github.com/NixOS/nixpkgs/issues/48663#issuecomment-1083031627
81 # replace with https://github.com/NixOS/nixpkgs/pull/140325 once it is merged
82 broken = lib.traceIf isPy27 "${pname} not supported on ${python.executable}" isPy27;