Subject: [PATCH 1/7] gnu: Remove python-dolfin-adjoint.

From: Andreas Enge <[email-masked]>
Date: Mon, 31 Mar 2025 23:52:50 +0200

* gnu/packages/simulation.scm (python-dolfin-adjoint): Delete variable.

Change-Id: Ia2bec142747a44a74cf35145838c9c5d440a8a4b
---
 gnu/packages/simulation.scm | 92 -------------------------------------
 1 file changed, 92 deletions(-)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index ebfe477265..161e6a85d4 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1187,98 +1187,6 @@ (define-public python-pygmsh
 command-line utility for mesh optimisation.")
     (license license:gpl3+)))
 
-(define-public python-dolfin-adjoint
-  (package
-    (name "python-dolfin-adjoint")
-    (version "2019.1.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/dolfin-adjoint/pyadjoint")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0xhy76a5f33hz94wc9g2mc5qmwkxfccbbc6yxl7psm130afp8lhn"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; One of the migration tests attempts to call openmpi
-           ;; recursively and fails.  See
-           ;; https://bitbucket.org/mpi4py/mpi4py/issues/95.  Run the
-           ;; test sequentially instead.
-           (with-directory-excursion "tests/migration/optimal_control_mms"
-             (substitute* "test_optimal_control_mms.py"
-               (("\\\"mpirun\\\", \\\"-n\\\", \\\"2\\\", ") "")))
-           ;; Result files are regenerated in the check phase.
-           (delete-file-recursively
-            "tests/migration/viscoelasticity/test-results")))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:test-flags
-      #~(list
-         ;; Ignore tests which require missing packages and/or failed during
-         ;; tests collection.
-         "--ignore=tests/firedrake_adjoint/test_assignment.py"
-         "--ignore=tests/firedrake_adjoint/test_burgers_newton.py"
-         "--ignore=tests/firedrake_adjoint/test_dynamic_meshes.py"
-         "--ignore=tests/firedrake_adjoint/test_hessian.py"
-         "--ignore=tests/firedrake_adjoint/test_reduced_functional.py"
-         "--ignore=tests/firedrake_adjoint/test_shape_derivatives.py"
-         "--ignore=tests/firedrake_adjoint/test_solving.py"
-         "--ignore=tests/firedrake_adjoint/test_tlm.py"
-         "--ignore=tests/migration/burgers_newton/test_burgers_newton.py"
-         "--ignore=tests/migration/linear_solver/test_linear_solver.py"
-         "--ignore=tests/migration/optimization_scipy/test_optimization_scipy.py"
-         "--ignore=tests/migration/projection/test_projection.py"
-         "--ignore=tests/migration/reduced_functional/test_reduced_functional.py"
-         "--ignore=tests/migration/split/test_split.py"
-         "-k" (string-append "not test_read_checkpoint"
-                             " and not test_krylov_solver_preconditioner_function_ctrl"))
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'build 'mpi-setup #$%openmpi-setup)
-          (add-before 'check 'set-environment-variables
-            (lambda _
-              (setenv "HOME" (getcwd))))
-          (add-after 'install 'install-doc
-            (lambda _
-              (let* ((doc (string-append #$output "/share/doc/" #$name "-" #$version))
-                     (examples (string-append doc "/examples")))
-                (mkdir-p examples)
-                (copy-recursively "examples" examples))))
-          ;; Remove 'sanity-check, because it tries to import
-          ;; firedrake_adjoint after importing fenics_adjoint.
-          ;; Both load a module named 'backend' and firedrake_adjoint
-          ;; fails with an ImportError if it sees that the backend module
-          ;; has already been loaded.
-          (delete 'sanity-check))))
-    (inputs
-     (list fenics openmpi pybind11))
-    (native-inputs
-     (list pkg-config
-           python-coverage
-           python-decorator
-           python-flake8
-           python-pkgconfig
-           python-pytest))
-    (propagated-inputs
-     (list python-scipy))
-    (home-page "https://www.dolfin-adjoint.org")
-    (synopsis "Automatic differentiation library")
-    (description
-     "@code{python-dolfin-adjoint} is a solver of differential equations
-associated with a governing system and a functional of interest.  Working from
-the forward model the solver automatically derives the discrete adjoint and
-tangent linear models.  These additional models are key ingredients in many
-algorithms such as data assimilation, optimal control, sensitivity analysis,
-design optimisation and error estimation.  The dolfin-adjoint project provides
-the necessary tools and data structures for cases where the forward model is
-implemented in @code{fenics} or
-@url{https://firedrakeproject.org,firedrake}.")
-    (license license:lgpl3)))
-
 (define %commonroad-dont-install-license-at-root
   #~(substitute* "setup.py"
       (("data_files=\\[\\('.', \\['LICENSE.txt'\\]\\)\\],")
-- 
2.49.0