1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 scipy, 7 checkpoint-schedules, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "pyadjoint-ad"; 13 version = "2025.04.1"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "dolfin-adjoint"; 18 repo = "pyadjoint"; 19 tag = version; 20 hash = "sha256-S9A0qCatnnLuOkqWsEC4tjVY1HZqqi2T5iXu+WUoN24="; 21 }; 22 23 build-system = [ 24 setuptools 25 ]; 26 27 dependencies = [ 28 scipy 29 checkpoint-schedules 30 ]; 31 32 pythonImportsCheck = [ 33 # The firedrake_adjoint module is deprecated and requires a cyclic dependency of firedrake 34 # "firedrake_adjoint" 35 "numpy_adjoint" 36 "pyadjoint" 37 "pyadjoint.optimization" 38 ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 enabledTestPaths = [ 43 "tests/pyadjoint" 44 ]; 45 46 meta = { 47 homepage = "https://github.com/dolfin-adjoint/pyadjoint"; 48 description = "High-level automatic differentiation library"; 49 license = lib.licenses.lgpl3Only; 50 maintainers = with lib.maintainers; [ qbisi ]; 51 }; 52}