2021-04-20 05:26:49 +01:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, setuptools-scm
|
|
|
|
, typecode
|
|
|
|
, patch
|
|
|
|
, extractcode-libarchive
|
|
|
|
, extractcode-7z
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-xdist
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "extractcode";
|
2021-06-18 22:47:15 +01:00
|
|
|
version = "21.6.2";
|
2021-04-20 05:26:49 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 22:47:15 +01:00
|
|
|
sha256 = "e665501438fedeb6e75335d880c8913a8cd894fd8adcf9c243eb6d48fad2d01c";
|
2021-04-20 05:26:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typecode
|
|
|
|
patch
|
|
|
|
extractcode-libarchive
|
|
|
|
extractcode-7z
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-xdist
|
|
|
|
];
|
|
|
|
|
|
|
|
# cli test tests the cli which we can't do until after install
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_extractcode_cli.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
# test_uncompress_* wants to use a binary to extract instead of the provided library
|
|
|
|
disabledTests = [
|
|
|
|
"test_uncompress_lz4_basic"
|
|
|
|
"test_extract_tarlz4_basic"
|
2021-06-20 20:44:01 +01:00
|
|
|
# tries to parse /boot/vmlinuz-*, which is not available in the nix sandbox
|
|
|
|
"test_can_extract_qcow2_vm_image_as_tarball"
|
|
|
|
"test_can_extract_qcow2_vm_image_not_as_tarball"
|
|
|
|
"test_can_listfs_from_qcow2_image"
|
2021-04-20 05:26:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"extractcode"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A mostly universal archive extractor using z7zip, libarchve, other libraries and the Python standard library for reliable archive extraction";
|
|
|
|
homepage = "https://github.com/nexB/extractcode";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.determinatesystems.members;
|
|
|
|
};
|
|
|
|
}
|