From c9936d3a058a829c03b4396f2a3713a3f1c223ed Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 11 Nov 2025 13:09:11 +0100 Subject: [PATCH] keepassxc: fix build with botan 3.10 This commit is a preparational step for a bump of the botan crypto library in a separate PR. I was not able to compile without converting a static to a dynamic cast. The fix will be included in the next upstream version of keepassxc. Signed-off-by: Markus Theil --- pkgs/by-name/ke/keepassxc/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ke/keepassxc/package.nix b/pkgs/by-name/ke/keepassxc/package.nix index 3215de670aa4..9664f170f761 100644 --- a/pkgs/by-name/ke/keepassxc/package.nix +++ b/pkgs/by-name/ke/keepassxc/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, cmake, libsForQt5, @@ -54,7 +55,16 @@ stdenv.mkDerivation (finalAttrs: { NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-rpath ${libargon2}/lib"; - patches = [ ./darwin.patch ]; + patches = [ + ./darwin.patch + # Fixes a static_cast related compilation issue by converting to dynamic cast. + # Will be included in next release > 2.7.10 and can be dropped on bump. + (fetchpatch2 { + name = "fix-botan-3.10.patch"; + url = "https://github.com/keepassxreboot/keepassxc/commit/fedcbf60c5c0dc7c3602c49a984d53a45c154c73.patch"; + hash = "sha256-UntT7/LDjslyqHqt5gJjzC/vMw/RVZLNj2ZxzBPL9xI="; + }) + ]; cmakeFlags = [ (lib.cmakeFeature "KEEPASSXC_BUILD_TYPE" "Release")