about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/treeo/default.nix
blob: 3629b47e8a298913499a44f4b6b8220a0a89516e (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
{ buildPythonPackage
, fetchFromGitHub
, jax
, jaxlib
, lib
, poetry-core
}:

buildPythonPackage rec {
  pname = "treeo";
  version = "0.0.9";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "cgarciae";
    repo = pname;
    rev = version;
    sha256 = "0jfqj5150braj4ybnifc6b8mp0w2j93li6bm20lcd7a19qs0lkk2";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  # These deps are not needed for the wheel, but required during the import.
  propagatedBuildInputs = [
    jax
    jaxlib
  ];

  pythonImportsCheck = [
    "treeo"
  ];

  meta = with lib; {
    description = "A small library for creating and manipulating custom JAX Pytree classes.";
    homepage = "https://github.com/cgarciae/treeo";
    license = licenses.mit;
    maintainers = with maintainers; [ ndl ];
  };
}