nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 61 lines 1.7 kB view raw
1{ buildPythonPackage 2, callPackage 3, fetchPypi 4, isPy27 5, lib 6, cryptography 7, grpcio 8, pyyaml 9, grpcio-tools 10, hadoop 11, pytestCheckHook 12, python 13}: 14 15buildPythonPackage rec { 16 pname = "skein"; 17 version = "0.8.1"; 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "04208b4be9df2dc68ac5b3e3ae51fd9b589add95ea1b67222a8de754d17b1efa"; 21 }; 22 # Update this hash if bumping versions 23 jarHash = "sha256-UGiEoTZ17IhLG72FZ18Zb+Ej4T8z9rMIMDUxzSZGZyY="; 24 skeinJar = callPackage ./skeinjar.nix { inherit pname version jarHash; }; 25 26 propagatedBuildInputs = [ cryptography grpcio pyyaml ]; 27 buildInputs = [ grpcio-tools ]; 28 29 preBuild = '' 30 # Ensure skein.jar exists skips the maven build in setup.py 31 mkdir -p skein/java 32 ln -s ${skeinJar} skein/java/skein.jar 33 ''; 34 35 postPatch = '' 36 substituteInPlace skein/core.py --replace "'yarn'" "'${hadoop}/bin/yarn'" \ 37 --replace "else 'java'" "else '${hadoop.jdk}/bin/java'" 38 ''; 39 40 pythonImportsCheck = [ "skein" ]; 41 42 checkInputs = [ pytestCheckHook ]; 43 # These tests require connecting to a YARN cluster. They could be done through NixOS tests later. 44 disabledTests = [ 45 "test_ui" 46 "test_tornado" 47 "test_kv" 48 "test_core" 49 "test_cli" 50 ]; 51 52 meta = with lib; { 53 homepage = "https://jcristharif.com/skein"; 54 description = "A tool and library for easily deploying applications on Apache YARN"; 55 license = licenses.bsd3; 56 maintainers = with maintainers; [ alexbiehl illustris ]; 57 # https://github.com/NixOS/nixpkgs/issues/48663#issuecomment-1083031627 58 # replace with https://github.com/NixOS/nixpkgs/pull/140325 once it is merged 59 broken = lib.traceIf isPy27 "${pname} not supported on ${python.executable}" isPy27; 60 }; 61}