1{ lib
2, fetchPypi
3, buildPythonPackage
4, setuptools-scm
5, typecode
6, patch
7, extractcode-libarchive
8, extractcode-7z
9, pytestCheckHook
10, pytest-xdist
11}:
12buildPythonPackage rec {
13 pname = "extractcode";
14 version = "21.2.24";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "f91638dbf523b80df90ac184c25d5cd1ea24cac53f67a6bb7d7b389867e0744b";
19 };
20
21 dontConfigure = true;
22
23 nativeBuildInputs = [
24 setuptools-scm
25 ];
26
27 propagatedBuildInputs = [
28 typecode
29 patch
30 extractcode-libarchive
31 extractcode-7z
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 pytest-xdist
37 ];
38
39 # cli test tests the cli which we can't do until after install
40 disabledTestPaths = [
41 "tests/test_extractcode_cli.py"
42 ];
43
44 # test_uncompress_* wants to use a binary to extract instead of the provided library
45 disabledTests = [
46 "test_uncompress_lz4_basic"
47 "test_extract_tarlz4_basic"
48 ];
49
50 pythonImportsCheck = [
51 "extractcode"
52 ];
53
54 meta = with lib; {
55 description = "A mostly universal archive extractor using z7zip, libarchve, other libraries and the Python standard library for reliable archive extraction";
56 homepage = "https://github.com/nexB/extractcode";
57 license = licenses.asl20;
58 maintainers = teams.determinatesystems.members;
59 };
60}