haskellPackages.botan-bindings: Fix broken package AND haskellPackages.botan-low: Skip failing tests (#430146)

Malte Ott 1afb300b 823c642e

Changed files
+163 -3
pkgs
+148
pkgs/development/haskell-modules/configuration-common.nix
···
# and therefore aren't uploaded to hackage
# Needs to be fixed upstream
haskore = dontCheck (doJailbreak super.haskore);
+
+
# 2025-08-01: Fixes few build errors related to pointers.
+
# https://github.com/haskell-cryptography/botan/pull/17
+
botan-bindings = appendPatch (pkgs.fetchpatch2 {
+
url = "https://github.com/haskell-cryptography/botan/commit/99de68c3938187b7ab740c6534ec032a4a236747.patch";
+
sha256 = "sha256-v255WFO9HsRuTAWFZG27TYbpoK7rJ1AuiCFNFIV18mI=";
+
stripLen = 1;
+
}) super.botan-bindings;
+
+
# 2025-08-04: Disable failing testcases. It would feel bad to disable all the
+
# checks in a cryptography related package.
+
botan-low = overrideCabal (drv: {
+
testFlags =
+
drv.testFlags or [ ]
+
++ (lib.concatMap (x: [ "--skip" ] ++ [ x ]) [
+
# botan-low-cipher-tests
+
"/AES-128/SIV/can incrementally / online encipher a message/"
+
"/AES-128/SIV/can incrementally / online decipher a message/"
+
"/AES-128/SIV/has parity between online and offline/"
+
"/AES-192/SIV/can incrementally / online encipher a message/"
+
"/AES-192/SIV/can incrementally / online decipher a message/"
+
"/AES-192/SIV/has parity between online and offline/"
+
"/AES-256/SIV/can incrementally / online encipher a message/"
+
"/AES-256/SIV/can incrementally / online decipher a message/"
+
"/AES-256/SIV/has parity between online and offline/"
+
"/ARIA-128/SIV/can incrementally / online encipher a message/"
+
"/ARIA-128/SIV/can incrementally / online decipher a message/"
+
"/ARIA-128/SIV/has parity between online and offline/"
+
"/ARIA-192/SIV/can incrementally / online encipher a message/"
+
"/ARIA-192/SIV/can incrementally / online decipher a message/"
+
"/ARIA-192/SIV/has parity between online and offline/"
+
"/ARIA-256/SIV/can incrementally / online encipher a message/"
+
"/ARIA-256/SIV/can incrementally / online decipher a message/"
+
"/ARIA-256/SIV/has parity between online and offline/"
+
"/Camellia-128/SIV/can incrementally / online encipher a message/"
+
"/Camellia-128/SIV/can incrementally / online decipher a message/"
+
"/Camellia-128/SIV/has parity between online and offline/"
+
"/Camellia-192/SIV/can incrementally / online encipher a message/"
+
"/Camellia-192/SIV/can incrementally / online decipher a message/"
+
"/Camellia-192/SIV/has parity between online and offline/"
+
"/Camellia-256/SIV/can incrementally / online encipher a message/"
+
"/Camellia-256/SIV/can incrementally / online decipher a message/"
+
"/Camellia-256/SIV/has parity between online and offline/"
+
"/Noekeon/SIV/can incrementally / online encipher a message/"
+
"/Noekeon/SIV/can incrementally / online decipher a message/"
+
"/Noekeon/SIV/has parity between online and offline/"
+
"/SEED/SIV/can incrementally / online encipher a message/"
+
"/SEED/SIV/can incrementally / online decipher a message/"
+
"/SEED/SIV/has parity between online and offline/"
+
"/SM4/SIV/can incrementally / online encipher a message/"
+
"/SM4/SIV/can incrementally / online decipher a message/"
+
"/SM4/SIV/has parity between online and offline/"
+
"/Serpent/SIV/can incrementally / online encipher a message/"
+
"/Serpent/SIV/can incrementally / online decipher a message/"
+
"/Serpent/SIV/has parity between online and offline/"
+
"/Twofish/SIV/can incrementally / online encipher a message/"
+
"/Twofish/SIV/can incrementally / online decipher a message/"
+
"/Twofish/SIV/has parity between online and offline/"
+
"/AES-128/CCM/can incrementally / online encipher a message/"
+
"/AES-128/CCM/can incrementally / online decipher a message/"
+
"/AES-128/CCM/has parity between online and offline/"
+
"/AES-192/CCM/can incrementally / online encipher a message/"
+
"/AES-192/CCM/can incrementally / online decipher a message/"
+
"/AES-192/CCM/has parity between online and offline/"
+
"/AES-256/CCM/can incrementally / online encipher a message/"
+
"/AES-256/CCM/can incrementally / online decipher a message/"
+
"/AES-256/CCM/has parity between online and offline/"
+
"/ARIA-128/CCM/can incrementally / online encipher a message/"
+
"/ARIA-128/CCM/can incrementally / online decipher a message/"
+
"/ARIA-128/CCM/has parity between online and offline/"
+
"/ARIA-192/CCM/can incrementally / online encipher a message/"
+
"/ARIA-192/CCM/can incrementally / online decipher a message/"
+
"/ARIA-192/CCM/has parity between online and offline/"
+
"/ARIA-256/CCM/can incrementally / online encipher a message/"
+
"/ARIA-256/CCM/can incrementally / online decipher a message/"
+
"/ARIA-256/CCM/has parity between online and offline/"
+
"/Camellia-128/CCM/can incrementally / online encipher a message/"
+
"/Camellia-128/CCM/can incrementally / online decipher a message/"
+
"/Camellia-128/CCM/has parity between online and offline/"
+
"/Camellia-192/CCM/can incrementally / online encipher a message/"
+
"/Camellia-192/CCM/can incrementally / online decipher a message/"
+
"/Camellia-192/CCM/has parity between online and offline/"
+
"/Camellia-256/CCM/can incrementally / online encipher a message/"
+
"/Camellia-256/CCM/can incrementally / online decipher a message/"
+
"/Camellia-256/CCM/has parity between online and offline/"
+
"/Noekeon/CCM/can incrementally / online encipher a message/"
+
"/Noekeon/CCM/can incrementally / online decipher a message/"
+
"/Noekeon/CCM/has parity between online and offline/"
+
"/SEED/CCM/can incrementally / online encipher a message/"
+
"/SEED/CCM/can incrementally / online decipher a message/"
+
"/SEED/CCM/has parity between online and offline/"
+
"/SM4/CCM/can incrementally / online encipher a message/"
+
"/SM4/CCM/can incrementally / online decipher a message/"
+
"/SM4/CCM/has parity between online and offline/"
+
"/Serpent/CCM/can incrementally / online encipher a message/"
+
"/Serpent/CCM/can incrementally / online decipher a message/"
+
"/Serpent/CCM/has parity between online and offline/"
+
"/Twofish/CCM/can incrementally / online encipher a message/"
+
"/Twofish/CCM/can incrementally / online decipher a message/"
+
"/Twofish/CCM/has parity between online and offline/"
+
# botan-low-mpi-tests
+
"/can compute the modular inverse/"
+
# botan-low-pubkey-dsa-tests
+
"/modp/srp/1024/privKeyLoadDSA/"
+
"/modp/srp/1024/pubKeyLoadDSA/"
+
"/modp/srp/1536/privKeyLoadDSA/"
+
"/modp/srp/1536/pubKeyLoadDSA/"
+
"/modp/srp/2048/privKeyLoadDSA/"
+
"/modp/srp/2048/pubKeyLoadDSA/"
+
"/modp/srp/3072/privKeyLoadDSA/"
+
"/modp/srp/3072/pubKeyLoadDSA/"
+
"/modp/srp/4096/privKeyLoadDSA/"
+
"/modp/srp/4096/pubKeyLoadDSA/"
+
"/modp/srp/6144/privKeyLoadDSA/"
+
"/modp/srp/6144/pubKeyLoadDSA/"
+
"/modp/srp/8192/privKeyLoadDSA/"
+
"/modp/srp/8192/pubKeyLoadDSA/"
+
# botan-low-pubkey-decrypt-tests
+
"/SM2 sm2p256v1 SHA-256/decrypt/"
+
# botan-low-pubkey-encrypt-tests
+
"/SM2 sm2p256v1 SHA-256/encrypt/"
+
# botan-low-pwdhash-tests
+
"/Scrypt/pwdhashTimed/"
+
# botan-low-srp6-tests
+
"/ffdhe/ietf/2048/can negotiate a shared secret/"
+
"/ffdhe/ietf/3072/can negotiate a shared secret/"
+
"/ffdhe/ietf/4096/can negotiate a shared secret/"
+
"/ffdhe/ietf/6144/can negotiate a shared secret/"
+
"/ffdhe/ietf/8192/can negotiate a shared secret/"
+
"/modp/ietf/1024/can negotiate a shared secret/"
+
"/modp/ietf/1536/can negotiate a shared secret/"
+
"/modp/ietf/2048/can negotiate a shared secret/"
+
"/modp/ietf/3072/can negotiate a shared secret/"
+
"/modp/ietf/4096/can negotiate a shared secret/"
+
"/modp/ietf/6144/can negotiate a shared secret/"
+
"/modp/ietf/8192/can negotiate a shared secret/"
+
"/modp/srp/1024/can negotiate a shared secret/"
+
"/modp/srp/1536/can negotiate a shared secret/"
+
"/modp/srp/2048/can negotiate a shared secret/"
+
"/modp/srp/3072/can negotiate a shared secret/"
+
"/modp/srp/4096/can negotiate a shared secret/"
+
"/modp/srp/6144/can negotiate a shared secret/"
+
"/modp/srp/8192/can negotiate a shared secret/"
+
"/dsa/jce/1024/can negotiate a shared secret/"
+
"/dsa/botan/2048/can negotiate a shared secret/"
+
"/dsa/botan/3072/can negotiate a shared secret/"
+
]);
+
}) super.botan-low;
// import ./configuration-tensorflow.nix { inherit pkgs haskellLib; } self super
+13
pkgs/development/haskell-modules/configuration-darwin.nix
···
__darwinAllowLocalNetworking = true;
});
+
# 2025-08-04: Some RNG tests fail only on Darwin
+
botan-low = overrideCabal (drv: {
+
testFlags =
+
drv.testFlags or [ ]
+
++ (lib.concatMap (x: [ "--skip" ] ++ [ x ]) [
+
# botan-low-rng-tests
+
"/rdrand/rngInit/"
+
"/rdrand/rngGet/"
+
"/rdrand/rngReseed/"
+
"/rdrand/rngReseedFromRNGCtx/"
+
"/rdrand/rngAddEntropy/"
+
]);
+
}) super.botan-low;
}
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 {
# aarch64-darwin
-1
pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml
···
- boring-window-switcher # failure in job https://hydra.nixos.org/build/233252547 at 2023-09-02
- borsh # failure in job https://hydra.nixos.org/build/252718760 at 2024-03-16
- bot # failure in job https://hydra.nixos.org/build/233230089 at 2023-09-02
-
- botan-bindings # failure in job https://hydra.nixos.org/build/253695799 at 2024-03-31
- botpp # failure in job https://hydra.nixos.org/build/233201674 at 2023-09-02
- bottom # failure in job https://hydra.nixos.org/build/233225154 at 2023-09-02
- bound-simple # failure in job https://hydra.nixos.org/build/233201896 at 2023-09-02
+2
pkgs/development/haskell-modules/configuration-nix.nix
···
# Upper bounds of text and bytestring too strict: https://github.com/zsedem/haskell-cpython/pull/24
cpython = doJailbreak super.cpython;
+
+
botan-bindings = super.botan-bindings.override { botan = pkgs.botan3; };
-2
pkgs/development/haskell-modules/hackage-packages.nix
···
libraryPkgconfigDepends = [ botan ];
description = "Raw Botan bindings";
license = lib.licenses.bsd3;
-
hydraPlatforms = lib.platforms.none;
-
broken = true;
) { botan = null; };