2022-05-29 09:10:09 +00:00
|
|
|
{ stdenv
|
|
|
|
, abseil-cpp
|
2022-01-01 21:45:58 +00:00
|
|
|
, absl-py
|
|
|
|
, attrs
|
2021-12-13 01:09:35 +00:00
|
|
|
, buildPythonPackage
|
2022-01-01 21:45:58 +00:00
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
2021-12-13 01:09:35 +00:00
|
|
|
, lib
|
2022-01-01 21:45:58 +00:00
|
|
|
, numpy
|
|
|
|
, pybind11
|
|
|
|
, wrapt
|
2021-12-13 01:09:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dm-tree";
|
2022-12-30 19:13:07 +00:00
|
|
|
version = "0.1.8";
|
2022-01-01 21:45:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = "tree";
|
2022-12-30 19:13:07 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-VvSJTuEYjIz/4TTibSLkbg65YmcYqHImTHOomeorMJc=";
|
2021-12-13 01:09:35 +00:00
|
|
|
};
|
|
|
|
|
2022-01-01 21:45:58 +00:00
|
|
|
patches = [
|
|
|
|
./cmake.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pybind11
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
abseil-cpp
|
|
|
|
pybind11
|
|
|
|
];
|
2021-12-13 01:09:35 +00:00
|
|
|
|
2022-01-01 21:45:58 +00:00
|
|
|
checkInputs = [
|
|
|
|
absl-py
|
|
|
|
attrs
|
|
|
|
numpy
|
|
|
|
wrapt
|
|
|
|
];
|
2021-12-13 01:09:35 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "tree" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-29 09:10:09 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-12-13 01:09:35 +00:00
|
|
|
description = "Tree is a library for working with nested data structures.";
|
2022-01-01 21:45:58 +00:00
|
|
|
homepage = "https://github.com/deepmind/tree";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ samuela ndl ];
|
2021-12-13 01:09:35 +00:00
|
|
|
};
|
|
|
|
}
|