1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 replaceVars,
6
7 # build-system
8 setuptools,
9 versioningit,
10
11 # native dependencies
12 isa-l,
13
14 # tests
15 pytest-timeout,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "isal";
21 version = "1.7.2";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "pycompression";
26 repo = "python-isal";
27 rev = "v${version}";
28 hash = "sha256-gvUVSGarPA4KupQTd61x75CfqNVqZfFC1zq0R21Clf8=";
29 };
30
31 patches = [
32 (replaceVars ./version.patch {
33 inherit version;
34 })
35 ];
36
37 build-system = [
38 setuptools
39 versioningit
40 ];
41
42 buildInputs = [ isa-l ];
43
44 env.PYTHON_ISAL_LINK_DYNAMIC = true;
45
46 nativeCheckInputs = [
47 pytest-timeout
48 pytestCheckHook
49 ];
50
51 enabledTestPaths = [ "tests" ];
52
53 disabledTests = [
54 # calls `python -m isal` and fails on import
55 "test_compress_fast_best_are_exclusive"
56 "test_compress_infile_outfile"
57 "test_compress_infile_outfile_default"
58 "test_decompress_cannot_have_flags_compression"
59 "test_decompress_infile_outfile_error"
60 ];
61
62 pythonImportsCheck = [ "isal" ];
63
64 meta = with lib; {
65 changelog = "https://github.com/pycompression/python-isal/blob/${src.rev}/CHANGELOG.rst";
66 description = "Faster zlib and gzip compatible compression and decompression by providing python bindings for the isa-l library";
67 homepage = "https://github.com/pycompression/python-isal";
68 license = licenses.psfl;
69 maintainers = with maintainers; [ hexa ];
70 };
71}