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