25 buildPythonPackage rec {
30 disabled = pythonOlder "3.7";
32 src = fetchFromGitHub {
35 rev = "refs/tags/${version}";
36 hash = "sha256-FZmLriYhsX+zyQKCtCjbOy6MH+AvjzHRNUyaDSXGlLI=";
41 name = "use-poetry-core.patch";
42 url = "https://github.com/poets-ai/elegy/commit/0ed472882f470ed9eb7a63b8a537ffabe7e19aa7.patch";
43 hash = "sha256-nO/imHo7tEsiZh+64CF/M4eXQ1so3IunVhv8CvYP1ks=";
47 # The cloudpickle constraint is too strict. wandb is marked as an optional
48 # dependency but `buildPythonPackage` doesn't seem to respect that setting.
49 # Python constraint: https://github.com/poets-ai/elegy/issues/244
51 substituteInPlace pyproject.toml \
52 --replace 'python = ">=3.7,<3.10"' 'python = ">=3.7"' \
53 --replace 'cloudpickle = "^1.5.0"' 'cloudpickle = "*"' \
54 --replace 'wandb = { version = "^0.12.10", optional = true }' ""
65 propagatedBuildInputs = [
79 pythonImportsCheck = [
91 # Fails with `Could not find compiler for platform Host: NOT_FOUND: could not find registered compiler for platform Host -- check target linkage`.
92 # Runs fine in docker with Ubuntu 22.04. I suspect the issue is the sandboxing in `nixpkgs` but not sure.
93 "test_saved_model_poly"
94 # AttributeError: module 'jax' has no attribute 'tree_multimap'
99 description = "Neural Networks framework based on Jax inspired by Keras and Haiku";
100 homepage = "https://github.com/poets-ai/elegy";
101 changelog = "https://github.com/poets-ai/elegy/releases/tag/${version}";
102 license = licenses.asl20;
103 maintainers = with maintainers; [ ndl ];