1{ stdenv
2, abseil-cpp
3, absl-py
4, attrs
5, buildPythonPackage
6, cmake
7, fetchFromGitHub
8, lib
9, numpy
10, pybind11
11, wrapt
12}:
13
14buildPythonPackage rec {
15 pname = "dm-tree";
16 version = "0.1.8";
17
18 src = fetchFromGitHub {
19 owner = "deepmind";
20 repo = "tree";
21 rev = "refs/tags/${version}";
22 hash = "sha256-VvSJTuEYjIz/4TTibSLkbg65YmcYqHImTHOomeorMJc=";
23 };
24
25 patches = [
26 ./cmake.patch
27 ];
28
29 dontUseCmakeConfigure = true;
30
31 nativeBuildInputs = [
32 cmake
33 pybind11
34 ];
35
36 buildInputs = [
37 abseil-cpp
38 pybind11
39 ];
40
41 nativeCheckInputs = [
42 absl-py
43 attrs
44 numpy
45 wrapt
46 ];
47
48 pythonImportsCheck = [ "tree" ];
49
50 meta = with lib; {
51 broken = stdenv.isDarwin;
52 description = "Tree is a library for working with nested data structures.";
53 homepage = "https://github.com/deepmind/tree";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ samuela ndl ];
56 };
57}