1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, easyprocess 6, entrypoint2 7, patool 8}: 9 10buildPythonPackage rec { 11 pname = "pyunpack"; 12 version = "0.3"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "ponty"; 17 repo = "pyunpack"; 18 rev = "refs/tags/${version}"; 19 hash = "sha256-1MAdiX6+u35f6S8a0ZcIIebZE8bbxTy+0TnMohJ7J6s="; 20 }; 21 22 postPatch = '' 23 substituteInPlace pyunpack/__init__.py \ 24 --replace \ 25 '_exepath("patool")' \ 26 '"${patool}/bin/.patool-wrapped"' 27 ''; 28 29 propagatedBuildInputs = [ 30 easyprocess 31 entrypoint2 32 ]; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 36 pytestFlagsArray = [ "-x" ]; 37 38 pythonImportsCheck = [ "pyunpack" ]; 39 40 disabledTestPaths = [ 41 # unfree 42 "tests/test_rar.py" 43 44 # We get "patool: error: unrecognized arguments: --password 123" 45 # The currently packaged version of patool does not support this flag. 46 # https://github.com/wummel/patool/issues/114 47 # FIXME: Re-enable these once patool is updated 48 "tests/test_rarpw.py" 49 "tests/test_zippw.py" 50 ]; 51 52 meta = with lib; { 53 description = "Unpack archive files in python"; 54 homepage = "https://github.com/ponty/pyunpack"; 55 license = licenses.bsd2; 56 maintainers = with maintainers; [ pbsds ]; 57 }; 58}