14 zstandard, # Python bindings
18 buildPythonPackage rec {
19 pname = "ratarmountcore";
23 disabled = pythonOlder "3.10";
25 src = fetchFromGitHub {
29 hash = "sha256-2LPGKdofx2ID8BU0dZhGiZ3tUkd+niEVGvTSBFX4InU=";
30 fetchSubmodules = true;
33 sourceRoot = "${src.name}/core";
35 build-system = [ setuptools ];
37 optional-dependencies = {
45 _7z = [ libarchive-c ];
46 bzip2 = [ rapidgzip ];
47 gzip = [ indexed-gzip ];
50 zstd = [ indexed-zstd ];
57 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
59 pythonImportsCheck = [ "ratarmountcore" ];
62 # Disable this test because for arcane reasons running pytest with nix-build uses 10-100x
63 # more virtual memory than running the test directly or inside a local development nix-shell.
64 # This virtual memory usage caused os.fork called by Python multiprocessing to fail with
65 # "OSError: [Errno 12] Cannot allocate memory" on a test system with 16 GB RAM. It worked fine
66 # on a system with 96 GB RAM. In order to avoid build errors on "low"-memory systems, this
67 # test is disabled for now.
68 "tests/test_BlockParallelReaders.py"
74 "test_stream_compressed"
79 description = "Library for accessing archives by way of indexing";
80 homepage = "https://github.com/mxmlnkn/ratarmount/tree/master/core";
81 changelog = "https://github.com/mxmlnkn/ratarmount/blob/core-v${version}/core/CHANGELOG.md";
82 license = licenses.mit;
83 maintainers = with lib.maintainers; [ mxmlnkn ];