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