1{ lib 2, buildPythonPackage 3, extractcode-7z 4, extractcode-libarchive 5, fetchPypi 6, patch 7, pytest-xdist 8, pytestCheckHook 9, pythonOlder 10, setuptools-scm 11, typecode 12}: 13 14buildPythonPackage rec { 15 pname = "extractcode"; 16 version = "31.0.0"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-gIGTkum8+BKfdNiQT+ipjA3+0ngjVoQnNygsAoMRPYg="; 24 }; 25 26 dontConfigure = true; 27 28 nativeBuildInputs = [ 29 setuptools-scm 30 ]; 31 32 propagatedBuildInputs = [ 33 typecode 34 patch 35 extractcode-libarchive 36 extractcode-7z 37 ]; 38 39 checkInputs = [ 40 pytestCheckHook 41 pytest-xdist 42 ]; 43 44 disabledTestPaths = [ 45 # CLI test tests the CLI which we can't do until after install 46 "tests/test_extractcode_cli.py" 47 ]; 48 49 disabledTests = [ 50 # test_uncompress_* wants to use a binary to extract instead of the provided library 51 "test_uncompress_lz4_basic" 52 "test_extract_tarlz4_basic" 53 "test_extract_rar_with_trailing_data" 54 # Tries to parse /boot/vmlinuz-*, which is not available in the nix sandbox 55 "test_can_extract_qcow2_vm_image_as_tarball" 56 "test_can_extract_qcow2_vm_image_not_as_tarball" 57 "test_can_listfs_from_qcow2_image" 58 "test_get_extractor_qcow2" 59 # WARNING patch:patch.py:450 inconsistent line ends in patch hunks 60 "test_patch_info_patch_patches_windows_plugin_explorer_patch" 61 ]; 62 63 pythonImportsCheck = [ 64 "extractcode" 65 ]; 66 67 meta = with lib; { 68 description = "Universal archive extractor using z7zip, libarchve, other libraries and the Python standard library"; 69 homepage = "https://github.com/nexB/extractcode"; 70 license = licenses.asl20; 71 maintainers = teams.determinatesystems.members; 72 }; 73}