biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dm-tree / default.nix
blob909cd3aa523a01eccadd72f30278bdd01bebf99a
2   lib,
3   buildPythonPackage,
4   fetchpatch,
5   fetchFromGitHub,
6   stdenv,
8   # nativeBuildInputs
9   cmake,
10   pybind11,
12   # buildInputs
13   abseil-cpp,
15   # build-system
16   setuptools,
18   # checks
19   absl-py,
20   attrs,
21   numpy,
22   wrapt,
24 let
25   patchCMakeAbseil = fetchpatch {
26     name = "0001-don-t-rebuild-abseil.patch";
27     url = "https://raw.githubusercontent.com/conda-forge/dm-tree-feedstock/93a91aa2c13240cecf88133e2885ade9121b464a/recipe/patches/0001-don-t-rebuild-abseil.patch";
28     hash = "sha256-bho7lXAV5xHkPmWy94THJtx+6i+px5w6xKKfThvBO/M=";
29   };
30   patchCMakePybind = fetchpatch {
31     name = "0002-don-t-fetch-pybind11.patch";
32     url = "https://raw.githubusercontent.com/conda-forge/dm-tree-feedstock/93a91aa2c13240cecf88133e2885ade9121b464a/recipe/patches/0002-don-t-fetch-pybind11.patch";
33     hash = "sha256-41XIouQ4Fm1yewaxK9erfcnkGBS6vgdvMm/DyF0rsKg=";
34   };
36 buildPythonPackage rec {
37   pname = "dm-tree";
38   version = "0.1.8";
39   pyproject = true;
41   src = fetchFromGitHub {
42     owner = "deepmind";
43     repo = "tree";
44     rev = "refs/tags/${version}";
45     hash = "sha256-VvSJTuEYjIz/4TTibSLkbg65YmcYqHImTHOomeorMJc=";
46   };
48   patches = [
49     patchCMakeAbseil
50     patchCMakePybind
51   ] ++ (lib.optional stdenv.hostPlatform.isDarwin ./0003-don-t-configure-apple.patch);
53   dontUseCmakeConfigure = true;
55   nativeBuildInputs = [
56     cmake
57     pybind11
58   ];
60   buildInputs = [
61     abseil-cpp
62     pybind11
63   ];
65   build-system = [ setuptools ];
67   nativeCheckInputs = [
68     absl-py
69     attrs
70     numpy
71     wrapt
72   ];
74   pythonImportsCheck = [ "tree" ];
76   meta = {
77     description = "Tree is a library for working with nested data structures";
78     homepage = "https://github.com/deepmind/tree";
79     changelog = "https://github.com/google-deepmind/tree/releases/tag/${version}";
80     license = lib.licenses.asl20;
81     maintainers = with lib.maintainers; [
82       samuela
83       ndl
84     ];
85   };