12 pythonVersionNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
14 "x86_64-linux" = "manylinux_2_17_x86_64.manylinux2014_x86_64";
15 "aarch64-darwin" = "macosx_11_0_arm64";
18 "310-x86_64-linux" = "sha256-1b6w9wgT6fffTTpJ3MxdPSrFD7Xaby6prQYFljVn4x4=";
19 "311-x86_64-linux" = "sha256-8+HlzaxH30gB5N+ZKR0Oq+yswhq5gjiSF9jVsg8U22E=";
20 "312-x86_64-linux" = "sha256-e8iEQzB4D3RSXgrcPC4me/vsFKoXf1QFNZfQ7968zQE=";
21 "310-aarch64-darwin" = "sha256-2C60yJk/Pbx2woV7hzEmWGzNKWWnySDfTPm247PWIRA=";
22 "311-aarch64-darwin" = "sha256-rdLB7l/8ZYjV589qKtORiyu1rC7W30wzrsz1uihNRpk=";
23 "312-aarch64-darwin" = "sha256-DpbYMIbqceQeiL7PYwnvn9jLtv8EmfHXmxvPfZCw914=";
26 buildPythonPackage rec {
27 pname = "tensorstore";
31 # The source build involves some wonky Bazel stuff.
33 inherit pname version;
35 python = "cp${pythonVersionNoDot}";
36 abi = "cp${pythonVersionNoDot}";
37 dist = "cp${pythonVersionNoDot}";
38 platform = systemToPlatform.${stdenv.system} or (throw "unsupported system");
39 hash = hashes."${pythonVersionNoDot}-${stdenv.system}" or (throw "unsupported system/python version combination");
42 nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
44 propagatedBuildInputs = [
49 pythonImportsCheck = [ "tensorstore" ];
52 description = "Library for reading and writing large multi-dimensional arrays";
53 homepage = "https://google.github.io/tensorstore";
54 changelog = "https://github.com/google/tensorstore/releases/tag/v${version}";
55 license = licenses.asl20;
56 sourceProvenance = [ sourceTypes.binaryNativeCode ];
57 maintainers = with maintainers; [ samuela ];