1{ lib
2, buildPythonPackage
3, pythonOlder
4, python
5, fetchPypi
6, absl-py
7, etils
8, importlib-resources
9, typing-extensions
10, zipp
11}:
12
13buildPythonPackage rec {
14 pname = "array-record";
15 version = "0.5.0";
16 format = "wheel";
17
18 # As of 2023-10-31, PyPI includes wheels for Python 3.9, 3.10, and 3.11.
19 disabled = pythonOlder "3.9";
20
21 src = let
22 pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}";
23 in fetchPypi {
24 inherit version format;
25 pname = "array_record";
26 dist = pyShortVersion;
27 python = pyShortVersion;
28 abi = pyShortVersion;
29 platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
30 hash = {
31 cp39 = "sha256-BzMOVue7E1S1+5+XTcPELko81ujc9MbmqLhNsU7pqO0=";
32 cp310 = "sha256-eUD9pQu9GsbV8MPD1MiF3Ihr+zYioSOo6P15hYIwPYo=";
33 cp311 = "sha256-rAmkI3EIZPYiXrxFowfDC0Gf3kRw0uX0i6Kx6Zu+hNM=";
34 }.${pyShortVersion};
35 };
36
37 propagatedBuildInputs = [
38 absl-py
39 etils
40 importlib-resources
41 typing-extensions
42 zipp
43 ];
44
45 pythonImportsCheck = [ "array_record" ];
46
47 meta = with lib; {
48 description = "ArrayRecord is a new file format derived from Riegeli, achieving a new frontier of IO efficiency";
49 homepage = "https://github.com/google/array_record";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ GaetanLepage ];
52 platforms = [ "x86_64-linux" ];
53 };
54}