From 1a4f70d6a6331417bb4d3bdd3af920b20c74de40 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 5 Aug 2025 15:54:00 +0200 Subject: [PATCH] botan3: 3.8.1 -> 3.9.0 Release notes: https://botan.randombit.net/news.html#version-3-9-0-2025-08-05 Notable changes: - Support for RFC3779 - Speedups for various algorithms with vector instructions (SHA-1, ECC, ...) - better cmake support nixpkgs: - add support for building botan3 with mingw Signed-off-by: Markus Theil --- pkgs/development/libraries/botan/default.nix | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix index b58fe5b111eb..acf68d135c38 100644 --- a/pkgs/development/libraries/botan/default.nix +++ b/pkgs/development/libraries/botan/default.nix @@ -12,6 +12,7 @@ esdm, tpm2-tss, static ? stdenv.hostPlatform.isStatic, # generates static libraries *only* + windows, # build ESDM RNG plugin withEsdm ? false, @@ -73,11 +74,14 @@ let ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ tpm2-tss ] - ++ lib.optionals (lib.versionAtLeast version "3.6.0") [ + ++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ jitterentropy ] - ++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm) [ + ++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) [ esdm + ] + ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ + windows.pthreads ]; buildTargets = [ @@ -105,10 +109,10 @@ let ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ "--with-tpm2" ] - ++ lib.optionals (lib.versionAtLeast version "3.6.0") [ + ++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ "--enable-modules=jitter_rng" ] - ++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm) [ + ++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) [ "--enable-modules=esdm_rng" ] ++ lib.optionals (lib.versionAtLeast version "3.8.0" && policy != null) [ @@ -117,6 +121,9 @@ let ++ lib.optionals (lib.versionAtLeast version "3.8.0" && policy == "bsi") [ "--enable-module=ffi" "--enable-module=shake" + ] + ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ + "--os=mingw" ]; configurePhase = '' @@ -151,15 +158,15 @@ let thillux nikstur ]; - platforms = platforms.unix; + platforms = platforms.unix ++ lib.optionals (lib.versionAtLeast version "3.0") platforms.windows; license = licenses.bsd2; }; }); in { botan3 = common { - version = "3.8.1"; - hash = "sha256-sDloHUuGGi9YU3Rti6gG9VPiOGntctie2/o8Pb+hfmg="; + version = "3.9.0"; + hash = "sha256-jD8oS1jd1C6OQ+n6hqcSnYfqfD93aoDT2mPsIHIrCIM="; }; botan2 = common {