at 24.05-pre 1.4 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, poetry-core 6, pytestCheckHook 7 }: 8 9buildPythonPackage rec { 10 pname = "sh"; 11 version = "2.0.6"; 12 format = "pyproject"; 13 14 src = fetchFromGitHub { 15 owner = "amoffat"; 16 repo = "sh"; 17 rev = "refs/tags/${version}"; 18 hash = "sha256-c4Ms4ydcW7LgmAI1WuYD74nzILuY/Xg+JePJe0q5AQQ="; 19 }; 20 21 nativeBuildInputs = [ 22 poetry-core 23 ]; 24 25 nativeCheckInputs = [ 26 pytestCheckHook 27 ]; 28 29 pytestFlagsArray = [ 30 "tests" 31 ]; 32 33 # A test needs the HOME directory to be different from $TMPDIR. 34 preCheck = '' 35 export HOME=$(mktemp -d) 36 ''; 37 38 disabledTests = [ 39 # Disable tests that fail on Hydra 40 "test_no_fd_leak" 41 "test_piped_exception1" 42 "test_piped_exception2" 43 "test_unicode_path" 44 # fails to import itself after modifying the environment 45 "test_environment" 46 # timing sensitive through usage of sleep(1) and signal handling 47 # https://github.com/amoffat/sh/issues/684 48 "test_general_signal" 49 ] ++ lib.optionals stdenv.isDarwin [ 50 # Disable tests that fail on Darwin sandbox 51 "test_background_exception" 52 "test_cwd" 53 "test_ok_code" 54 ]; 55 56 meta = with lib; { 57 description = "Python subprocess interface"; 58 homepage = "https://pypi.python.org/pypi/sh/"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ siriobalmelli ]; 61 }; 62}