about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dm-tree/default.nix
blob: 27befa4f7726972c9fb48cc2fcd3d5422af8d219 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
  stdenv,
  abseil-cpp,
  absl-py,
  attrs,
  buildPythonPackage,
  cmake,
  fetchFromGitHub,
  lib,
  numpy,
  pybind11,
  wrapt,
}:

buildPythonPackage rec {
  pname = "dm-tree";
  version = "0.1.8";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "deepmind";
    repo = "tree";
    rev = "refs/tags/${version}";
    hash = "sha256-VvSJTuEYjIz/4TTibSLkbg65YmcYqHImTHOomeorMJc=";
  };

  patches = [ ./cmake.patch ];

  dontUseCmakeConfigure = true;

  nativeBuildInputs = [
    cmake
    pybind11
  ];

  buildInputs = [
    abseil-cpp
    pybind11
  ];

  nativeCheckInputs = [
    absl-py
    attrs
    numpy
    wrapt
  ];

  pythonImportsCheck = [ "tree" ];

  meta = with lib; {
    broken = stdenv.isDarwin;
    description = "Tree is a library for working with nested data structures.";
    homepage = "https://github.com/deepmind/tree";
    license = licenses.asl20;
    maintainers = with maintainers; [
      samuela
      ndl
    ];
  };
}