1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6
7 pythonOlder,
8
9 setuptools,
10
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "python-idzip";
16 version = "0.3.9";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "bauman";
23 repo = "python-idzip";
24 tag = version;
25 hash = "sha256-ChzwC/Afn0qeo5anq4anIu2eI9i6XDnSvB7jAwY7rSw=";
26 };
27
28 patches = [
29 # fix collision
30 # https://github.com/bauman/python-idzip/pull/23
31 (fetchpatch {
32 name = "fix-bin-folder-collisions.patch";
33 url = "https://patch-diff.githubusercontent.com/raw/bauman/python-idzip/pull/23.patch";
34 hash = "sha256-4fPhLdY9MaH1aX6tqMT+NNNNDsyv87G0xBh4MC+5yQE=";
35 })
36 ];
37
38 nativeBuildInputs = [ setuptools ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 disabledTestPaths = [
43 # need third-party files
44 # https://github.com/bauman/python-idzip/blob/master/.github/workflows/test.yaml#L2https://github.com/bauman/python-idzip/blob/master/.github/workflows/test.yaml#L288
45 "test/test_compressor.py"
46 "test/test_decompressor.py"
47 "test/test_lucky_cache.py"
48 "test/test_readline.py"
49 "test/test_seek_read_behavior.py"
50 "test/test_zero_cache.py"
51 ];
52
53 disabledTests = [
54 # Terminated
55 # pop_var_context: head of shell_variables not a function context
56 "test_bufferedio_compat"
57 ];
58
59 meta = with lib; {
60 description = "Seekable, gzip compatible, compression format";
61 mainProgram = "idzip";
62 homepage = "https://github.com/bauman/python-idzip";
63 changelog = "https://github.com/bauman/python-idzip/releases/tag/${version}";
64 license = licenses.mit;
65 maintainers = with maintainers; [ vizid ];
66 };
67}