2022-01-03 16:56:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, numpy
|
|
|
|
, parameterized
|
|
|
|
, pillow
|
|
|
|
, scipy
|
2022-04-15 01:41:22 +00:00
|
|
|
, tensorboard
|
2022-01-03 16:56:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "objax";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.6.0";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "objax";
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-/6tZxVDe/3C53Re14odU9VA3mKvSj9X3/xt6bHFLHwQ=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
# Avoid propagating the dependency on `jaxlib`, see
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/156767
|
|
|
|
buildInputs = [
|
|
|
|
jaxlib
|
|
|
|
];
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jax
|
|
|
|
numpy
|
|
|
|
parameterized
|
|
|
|
pillow
|
|
|
|
scipy
|
2022-04-15 01:41:22 +00:00
|
|
|
tensorboard
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"objax"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Objax is a machine learning framework that provides an Object Oriented layer for JAX.";
|
|
|
|
homepage = "https://github.com/google/objax";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ndl ];
|
|
|
|
};
|
|
|
|
}
|