1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 docstring-parser,
11 rich,
12 shtab,
13 typeguard,
14 typing-extensions,
15
16 # tests
17 attrs,
18 flax,
19 jax,
20 ml-collections,
21 omegaconf,
22 pydantic,
23 pytestCheckHook,
24 torch,
25}:
26
27buildPythonPackage rec {
28 pname = "tyro";
29 version = "0.9.19";
30 pyproject = true;
31
32 src = fetchFromGitHub {
33 owner = "brentyi";
34 repo = "tyro";
35 tag = "v${version}";
36 hash = "sha256-A1Vplc84Xy8TufqmklPUzIdgiPpFcIjqV0eUgdKmYRM=";
37 };
38
39 build-system = [ hatchling ];
40
41 dependencies = [
42 docstring-parser
43 rich
44 shtab
45 typeguard
46 typing-extensions
47 ];
48
49 nativeCheckInputs = [
50 attrs
51 flax
52 jax
53 ml-collections
54 omegaconf
55 pydantic
56 pytestCheckHook
57 torch
58 ];
59
60 pythonImportsCheck = [ "tyro" ];
61
62 meta = {
63 description = "CLI interfaces & config objects, from types";
64 homepage = "https://github.com/brentyi/tyro";
65 changelog = "https://github.com/brentyi/tyro/releases/tag/v${version}";
66 license = lib.licenses.mit;
67 maintainers = with lib.maintainers; [ hoh ];
68 };
69}