From d84fecd6221c1b8ac2f7e6d12a16b10f82b0f80b Mon Sep 17 00:00:00 2001 From: whispers Date: Wed, 23 Sep 2026 16:12:00 -0400 Subject: [PATCH] simple-dftd3: fix build with gfortran 16 set_model_ghost_index was not declared as part of the public api, leading to link errors with gfortran 16. we would submit this contribution upstream, but they disallow contributions under pseudonyms, which is a dealbreaker for us. if someone else wants to, they are welcome to. --- .../libraries/science/chemistry/simple-dftd3/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix index f65b73f790b1..6d1ca78d4a37 100644 --- a/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix +++ b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix @@ -33,6 +33,14 @@ stdenv.mkDerivation rec { hash = "sha256-THl8sUY7pLxFz4mY7FMj/c1hwzqLaaNNMq0qkxWkUzw="; }; + # set_model_ghost_index was not declared as part of the public api, leading + # to link errors with gfortran 16. + postPatch = '' + substituteInPlace src/dftd3/api.f90 --replace-fail \ + "public :: set_model_ewald, set_model_work_partition" \ + "public :: set_model_ewald, set_model_ghost_index, set_model_work_partition" + ''; + patches = [ ./cmake.patch ];