2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, extractcode-7z
|
2022-08-12 12:06:08 +00:00
|
|
|
, extractcode-libarchive
|
|
|
|
, fetchPypi
|
|
|
|
, patch
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytest-xdist
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytestCheckHook
|
2022-07-14 12:49:19 +00:00
|
|
|
, pythonOlder
|
2022-08-12 12:06:08 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, typecode
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "extractcode";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "31.0.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
hash = "sha256-gIGTkum8+BKfdNiQT+ipjA3+0ngjVoQnNygsAoMRPYg=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typecode
|
|
|
|
patch
|
|
|
|
extractcode-libarchive
|
|
|
|
extractcode-7z
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-xdist
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2022-08-12 12:06:08 +00:00
|
|
|
# CLI test tests the CLI which we can't do until after install
|
2021-04-25 03:57:28 +00:00
|
|
|
"tests/test_extractcode_cli.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-08-12 12:06:08 +00:00
|
|
|
# test_uncompress_* wants to use a binary to extract instead of the provided library
|
2021-04-25 03:57:28 +00:00
|
|
|
"test_uncompress_lz4_basic"
|
|
|
|
"test_extract_tarlz4_basic"
|
2021-10-11 16:52:03 +00:00
|
|
|
"test_extract_rar_with_trailing_data"
|
2022-08-12 12:06:08 +00:00
|
|
|
# Tries to parse /boot/vmlinuz-*, which is not available in the nix sandbox
|
2021-06-28 23:13:55 +00:00
|
|
|
"test_can_extract_qcow2_vm_image_as_tarball"
|
|
|
|
"test_can_extract_qcow2_vm_image_not_as_tarball"
|
|
|
|
"test_can_listfs_from_qcow2_image"
|
2022-07-14 12:49:19 +00:00
|
|
|
"test_get_extractor_qcow2"
|
2022-08-12 12:06:08 +00:00
|
|
|
# WARNING patch:patch.py:450 inconsistent line ends in patch hunks
|
|
|
|
"test_patch_info_patch_patches_windows_plugin_explorer_patch"
|
2023-01-20 10:41:00 +00:00
|
|
|
# AssertionError: assert [['linux-2.6...._end;', ...]]] == [['linux-2.6...._end;', ...]]]
|
|
|
|
"test_patch_info_patch_patches_misc_linux_st710x_patches_motorola_rootdisk_c_patch"
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"extractcode"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-11 16:52:03 +00:00
|
|
|
description = "Universal archive extractor using z7zip, libarchve, other libraries and the Python standard library";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/nexB/extractcode";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.determinatesystems.members;
|
|
|
|
};
|
|
|
|
}
|