2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
2022-01-03 16:56:52 +00:00
|
|
|
, buildPythonPackage
|
2023-08-22 20:05:09 +00:00
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, absl-py
|
2023-03-30 22:05:00 +00:00
|
|
|
, cloudpickle
|
2022-01-03 16:56:52 +00:00
|
|
|
, dm-tree
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
|
|
|
, toolz
|
2023-08-22 20:05:09 +00:00
|
|
|
, typing-extensions
|
2022-01-03 16:56:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chex";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.1.83";
|
2022-01-03 16:56:52 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-iEachJf5NjOnkMWdP0aVQHWNPgUUBkMnzHKq3GP7t4w=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
absl-py
|
2023-08-22 20:05:09 +00:00
|
|
|
jaxlib
|
2022-01-03 16:56:52 +00:00
|
|
|
jax
|
|
|
|
numpy
|
|
|
|
toolz
|
2023-08-22 20:05:09 +00:00
|
|
|
typing-extensions
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"chex"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
cloudpickle
|
|
|
|
dm-tree
|
2022-01-03 16:56:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Chex is a library of utilities for helping to write reliable JAX code.";
|
|
|
|
homepage = "https://github.com/deepmind/chex";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/google-deepmind/chex/releases/tag/v${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ndl ];
|
|
|
|
};
|
|
|
|
}
|