From 9dfa02e05539bdefd4fe1a4acc5e39b93ac6f818 Mon Sep 17 00:00:00 2001 From: whispers Date: Wed, 23 Sep 2026 15:44:46 -0400 Subject: [PATCH] dftd4: fix build with gfortran 16 get_numerical_hessian was not declared as part of the public API, leading to link errors with gfortran 16. --- pkgs/by-name/df/dftd4/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/df/dftd4/package.nix b/pkgs/by-name/df/dftd4/package.nix index b4bc8271cf33..26cd71b5ecc0 100644 --- a/pkgs/by-name/df/dftd4/package.nix +++ b/pkgs/by-name/df/dftd4/package.nix @@ -2,6 +2,7 @@ stdenv, lib, fetchFromGitHub, + fetchpatch, gfortran, buildType ? "meson", cmake, @@ -40,6 +41,14 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # Fix pkg-config, meson and cmake paths for include and lib dirs ./build-paths.patch + + # This was not declared as part of the public API, which led to linking + # failures with gfortran 16. + (fetchpatch { + name = "add-get_numerical_hessian_api-to-public-api.patch"; + url = "https://github.com/dftd4/dftd4/commit/f84dc4033d9ce036e74e709b9cf42c72249f4f52.patch"; + hash = "sha256-mdKWIKz8A92lI0sMl5rXwhzKd2UDej0yPYiKllH1Asc="; + }) ]; nativeBuildInputs = [