From 355a7677bac897ce575f89364db8333e6c9bc366 Mon Sep 17 00:00:00 2001 From: "git@71rd.net" Date: Thu, 25 Sep 2025 23:35:34 +0000 Subject: [PATCH 1/3] chickenPackages_5.chickenEggs.botan: mark broken Mark the chicken-scheme bindings for botan as broken. The package only supports the botan2 library that has been deprecated and is being removed --- pkgs/development/compilers/chicken/5/overrides.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/chicken/5/overrides.nix b/pkgs/development/compilers/chicken/5/overrides.nix index 861c47348091..5ea7a8bd71e6 100644 --- a/pkgs/development/compilers/chicken/5/overrides.nix +++ b/pkgs/development/compilers/chicken/5/overrides.nix @@ -31,7 +31,7 @@ in breadline = addToBuildInputs pkgs.readline; blas = addToBuildInputsWithPkgConfig pkgs.blas; blosc = addToBuildInputs pkgs.c-blosc; - botan = addToBuildInputsWithPkgConfig pkgs.botan2; + botan = broken; cairo = old: (addToBuildInputsWithPkgConfig pkgs.cairo old) From 0a6777c2a1f9fa0a7ee0bc24f8742ad04ceb3509 Mon Sep 17 00:00:00 2001 From: "git@71rd.net" Date: Thu, 25 Sep 2025 23:24:14 +0000 Subject: [PATCH 2/3] botan2: remove Removing botan2 from nixpkgs. Botan2 has been end-of-life since 2025-01-01 and was replaced with Botan3. Fixes: #445861 --- pkgs/development/libraries/botan/default.nix | 18 ++---------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix index 9cfa9570b7f9..03f0f0918412 100644 --- a/pkgs/development/libraries/botan/default.nix +++ b/pkgs/development/libraries/botan/default.nix @@ -1,7 +1,6 @@ { lib, stdenv, - fetchpatch, fetchurl, pkgsStatic, python3, @@ -146,7 +145,7 @@ let doCheck = true; - passthru.tests = lib.optionalAttrs (lib.versionAtLeast version "3") { + passthru.tests = { static = pkgsStatic.botan3; }; @@ -159,7 +158,7 @@ let thillux nikstur ]; - platforms = platforms.unix ++ lib.optionals (lib.versionAtLeast version "3.0") platforms.windows; + platforms = platforms.unix ++ platforms.windows; license = licenses.bsd2; }; }); @@ -169,17 +168,4 @@ in version = "3.9.0"; hash = "sha256-jD8oS1jd1C6OQ+n6hqcSnYfqfD93aoDT2mPsIHIrCIM="; }; - - botan2 = common { - version = "2.19.5"; - hash = "sha256-3+6g4KbybWckxK8B2pp7iEh62y2Bunxy/K9S21IsmtQ="; - patches = [ - # Fix build with gcc15 - (fetchpatch { - name = "botan2-add-include-cstdint-gcc15.patch"; - url = "https://src.fedoraproject.org/rpms/botan2/raw/c3fb7a3800df117e7ef8a7617ac8eacb31a4464a/f/f765f0b312f2998498f629d93369babfb2c975b4.patch"; - hash = "sha256-8Yhxd5TCgxUMtRiv3iq5sQaVjDF+b9slppm38/6l6lw="; - }) - ]; - }; } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index dc6dc101c845..cf220f6995a7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -563,6 +563,7 @@ mapAliases { boost184 = throw "Boost 1.84 has been removed as it is obsolete and no longer used by anything in Nixpkgs"; # Added 2024-11-24 boost185 = throw "Boost 1.85 has been removed as it is obsolete and no longer used by anything in Nixpkgs"; # Added 2024-11-24 boost_process = throw "boost_process has been removed as it is included in regular boost"; # Added 2024-05-01 + botan2 = throw "botan2 has been removed as it is EOL"; # Added 2025-10-20 bower2nix = throw "bower2nix has been removed as bower was removed. It is recommended to migrate to yarn."; # Added 2025-09-17 bpb = throw "bpb has been removed as it is unmaintained and not compatible with recent Rust versions"; # Added 2024-04-30 bpftool = throw "'bpftool' has been renamed to/replaced by 'bpftools'"; # Converted to throw 2024-10-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a65617f48b5d..860d0312cc45 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7012,7 +7012,6 @@ with pkgs; # botan3 only sensibly works with libcxxStdenv when building static binaries stdenv = if stdenv.hostPlatform.isStatic then buildPackages.libcxxStdenv else stdenv; }) - botan2 botan3 ; botanEsdm = botan3.override { withEsdm = true; }; From 98a16089ef58d31311fdc177fdf07189658b3fb8 Mon Sep 17 00:00:00 2001 From: "git@71rd.net" Date: Mon, 20 Oct 2025 14:08:05 +0000 Subject: [PATCH 3/3] botan3: move to by-name --- pkgs/by-name/bo/botan3/package.nix | 165 ++++++++++++++++++ pkgs/development/libraries/botan/default.nix | 171 ------------------- pkgs/top-level/all-packages.nix | 7 - 3 files changed, 165 insertions(+), 178 deletions(-) create mode 100644 pkgs/by-name/bo/botan3/package.nix delete mode 100644 pkgs/development/libraries/botan/default.nix diff --git a/pkgs/by-name/bo/botan3/package.nix b/pkgs/by-name/bo/botan3/package.nix new file mode 100644 index 000000000000..7a52f1d1b89b --- /dev/null +++ b/pkgs/by-name/bo/botan3/package.nix @@ -0,0 +1,165 @@ +{ + lib, + stdenv, + buildPackages, + fetchurl, + pkgsStatic, + python3, + docutils, + bzip2, + zlib, + jitterentropy, + darwin, + esdm, + tpm2-tss, + static ? stdenv.hostPlatform.isStatic, # generates static libraries *only* + windows, + + # build ESDM RNG plugin + withEsdm ? false, + # useful, but have to disable tests for now, as /dev/tpmrm0 is not accessible + withTpm2 ? false, + policy ? null, +}: + +assert lib.assertOneOf "policy" policy [ + # no explicit policy is given. The defaults by the library are used + null + # only allow BSI approved algorithms, FFI and SHAKE for XMSS + "bsi" + # only allow NIST approved algorithms in FIPS 140 + "fips140" + # only allow "modern" algorithms + "modern" +]; + +let + stdenv' = if static then buildPackages.libxccStdenv else stdenv; +in +stdenv'.mkDerivation (finalAttrs: { + version = "3.9.0"; + pname = "botan"; + + __structuredAttrs = true; + enableParallelBuilding = true; + strictDeps = true; + + outputs = [ + "bin" + "out" + "dev" + "doc" + "man" + ]; + + src = fetchurl { + url = "http://botan.randombit.net/releases/Botan-${finalAttrs.version}.tar.xz"; + hash = "sha256-jD8oS1jd1C6OQ+n6hqcSnYfqfD93aoDT2mPsIHIrCIM="; + }; + + nativeBuildInputs = [ + python3 + docutils + ]; + + buildInputs = [ + bzip2 + zlib + ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ + tpm2-tss + ] + ++ lib.optionals (lib.versionAtLeast finalAttrs.version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ + jitterentropy + ] + ++ + lib.optionals + (lib.versionAtLeast finalAttrs.version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) + [ + esdm + ] + ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ + windows.pthreads + ]; + + buildTargets = [ + "cli" + ] + ++ lib.optionals finalAttrs.finalPackage.doCheck [ "tests" ] + ++ lib.optionals static [ "static" ] + ++ lib.optionals (!static) [ "shared" ]; + + botanConfigureFlags = [ + "--prefix=${placeholder "out"}" + "--bindir=${placeholder "bin"}/bin" + "--docdir=${placeholder "doc"}/share/doc" + "--mandir=${placeholder "man"}/share/man" + "--no-install-python-module" + "--build-targets=${lib.concatStringsSep "," finalAttrs.buildTargets}" + "--with-bzip2" + "--with-zlib" + "--with-rst2man" + "--cpu=${stdenv.hostPlatform.parsed.cpu.name}" + ] + ++ lib.optionals stdenv.cc.isClang [ + "--cc=clang" + ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ + "--with-tpm2" + ] + ++ lib.optionals (lib.versionAtLeast finalAttrs.version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ + "--enable-modules=jitter_rng" + ] + ++ + lib.optionals + (lib.versionAtLeast finalAttrs.version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) + [ + "--enable-modules=esdm_rng" + ] + ++ lib.optionals (lib.versionAtLeast finalAttrs.version "3.8.0" && policy != null) [ + "--module-policy=${policy}" + ] + ++ lib.optionals (lib.versionAtLeast finalAttrs.version "3.8.0" && policy == "bsi") [ + "--enable-module=ffi" + "--enable-module=shake" + ] + ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ + "--os=mingw" + ]; + + configurePhase = '' + runHook preConfigure + python configure.py ''${botanConfigureFlags[@]} + runHook postConfigure + ''; + + preInstall = '' + if [ -d src/scripts ]; then + patchShebangs src/scripts + fi + ''; + + postInstall = '' + cd "$out"/lib/pkgconfig + ln -s botan-*.pc botan.pc || true + ''; + + doCheck = true; + + passthru.tests = { + static = pkgsStatic.botan3; + }; + + meta = with lib; { + description = "Cryptographic algorithms library"; + homepage = "https://botan.randombit.net"; + mainProgram = "botan"; + maintainers = with maintainers; [ + raskin + thillux + nikstur + ]; + platforms = platforms.unix ++ platforms.windows; + license = licenses.bsd2; + }; +}) diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix deleted file mode 100644 index 03f0f0918412..000000000000 --- a/pkgs/development/libraries/botan/default.nix +++ /dev/null @@ -1,171 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - pkgsStatic, - python3, - docutils, - bzip2, - zlib, - jitterentropy, - darwin, - esdm, - tpm2-tss, - static ? stdenv.hostPlatform.isStatic, # generates static libraries *only* - windows, - - # build ESDM RNG plugin - withEsdm ? false, - # useful, but have to disable tests for now, as /dev/tpmrm0 is not accessible - withTpm2 ? false, - policy ? null, -}: - -assert lib.assertOneOf "policy" policy [ - # no explicit policy is given. The defaults by the library are used - null - # only allow BSI approved algorithms, FFI and SHAKE for XMSS - "bsi" - # only allow NIST approved algorithms in FIPS 140 - "fips140" - # only allow "modern" algorithms - "modern" -]; - -let - common = - { - version, - hash, - patches ? [ ], - }: - stdenv.mkDerivation (finalAttrs: { - pname = "botan"; - inherit version; - - __structuredAttrs = true; - enableParallelBuilding = true; - strictDeps = true; - - outputs = [ - "bin" - "out" - "dev" - "doc" - "man" - ]; - - src = fetchurl { - url = "http://botan.randombit.net/releases/Botan-${finalAttrs.version}.tar.xz"; - inherit hash; - }; - - inherit patches; - - nativeBuildInputs = [ - python3 - docutils - ]; - - buildInputs = [ - bzip2 - zlib - ] - ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ - tpm2-tss - ] - ++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ - jitterentropy - ] - ++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) [ - esdm - ] - ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ - windows.pthreads - ]; - - buildTargets = [ - "cli" - ] - ++ lib.optionals finalAttrs.finalPackage.doCheck [ "tests" ] - ++ lib.optionals static [ "static" ] - ++ lib.optionals (!static) [ "shared" ]; - - botanConfigureFlags = [ - "--prefix=${placeholder "out"}" - "--bindir=${placeholder "bin"}/bin" - "--docdir=${placeholder "doc"}/share/doc" - "--mandir=${placeholder "man"}/share/man" - "--no-install-python-module" - "--build-targets=${lib.concatStringsSep "," finalAttrs.buildTargets}" - "--with-bzip2" - "--with-zlib" - "--with-rst2man" - "--cpu=${stdenv.hostPlatform.parsed.cpu.name}" - ] - ++ lib.optionals stdenv.cc.isClang [ - "--cc=clang" - ] - ++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [ - "--with-tpm2" - ] - ++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [ - "--enable-modules=jitter_rng" - ] - ++ 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) [ - "--module-policy=${policy}" - ] - ++ lib.optionals (lib.versionAtLeast version "3.8.0" && policy == "bsi") [ - "--enable-module=ffi" - "--enable-module=shake" - ] - ++ lib.optionals (stdenv.hostPlatform.isMinGW) [ - "--os=mingw" - ]; - - configurePhase = '' - runHook preConfigure - python configure.py ''${botanConfigureFlags[@]} - runHook postConfigure - ''; - - preInstall = '' - if [ -d src/scripts ]; then - patchShebangs src/scripts - fi - ''; - - postInstall = '' - cd "$out"/lib/pkgconfig - ln -s botan-*.pc botan.pc || true - ''; - - doCheck = true; - - passthru.tests = { - static = pkgsStatic.botan3; - }; - - meta = with lib; { - description = "Cryptographic algorithms library"; - homepage = "https://botan.randombit.net"; - mainProgram = "botan"; - maintainers = with maintainers; [ - raskin - thillux - nikstur - ]; - platforms = platforms.unix ++ platforms.windows; - license = licenses.bsd2; - }; - }); -in -{ - botan3 = common { - version = "3.9.0"; - hash = "sha256-jD8oS1jd1C6OQ+n6hqcSnYfqfD93aoDT2mPsIHIrCIM="; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 860d0312cc45..5882db3d8534 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7007,13 +7007,6 @@ with pkgs; boost = boost187; - inherit - (callPackages ../development/libraries/botan { - # botan3 only sensibly works with libcxxStdenv when building static binaries - stdenv = if stdenv.hostPlatform.isStatic then buildPackages.libcxxStdenv else stdenv; - }) - botan3 - ; botanEsdm = botan3.override { withEsdm = true; }; c-ares = callPackage ../development/libraries/c-ares { };