2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
abseil-cpp,
|
|
|
|
absl-py,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
cmake,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
numpy,
|
|
|
|
pybind11,
|
|
|
|
wrapt,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dm-tree";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.1.8";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = "tree";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-VvSJTuEYjIz/4TTibSLkbg65YmcYqHImTHOomeorMJc=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./cmake.patch ];
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pybind11
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
abseil-cpp
|
|
|
|
pybind11
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-03 16:56:52 +00:00
|
|
|
absl-py
|
|
|
|
attrs
|
|
|
|
numpy
|
|
|
|
wrapt
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "tree" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tree is a library for working with nested data structures";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://github.com/deepmind/tree";
|
|
|
|
license = licenses.asl20;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
samuela
|
|
|
|
ndl
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
}
|