2022-01-03 16:56:52 +00:00
|
|
|
{ abseil-cpp
|
|
|
|
, absl-py
|
|
|
|
, attrs
|
2021-12-19 01:06:50 +00:00
|
|
|
, buildPythonPackage
|
2022-01-03 16:56:52 +00:00
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
2021-12-19 01:06:50 +00:00
|
|
|
, lib
|
2022-01-03 16:56:52 +00:00
|
|
|
, numpy
|
|
|
|
, pybind11
|
|
|
|
, wrapt
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dm-tree";
|
2022-01-03 16:56:52 +00:00
|
|
|
# As of 2021-12-29, the latest stable version still builds with Bazel.
|
|
|
|
version = "unstable-2021-12-20";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = "tree";
|
|
|
|
rev = "b452e5c2743e7489b4ba7f16ecd51c516d7cd8e3";
|
|
|
|
sha256 = "1r187xwpvnnj98lyasngcv3lbxz0ziihpl5dbnjbfbjr0kh6z0j9";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
patches = [
|
|
|
|
./cmake.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pybind11
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
abseil-cpp
|
|
|
|
pybind11
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
absl-py
|
|
|
|
attrs
|
|
|
|
numpy
|
|
|
|
wrapt
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "tree" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ samuela ndl ];
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
}
|