1010# requiring to build a special variant for that software. Example: 'haproxy'
1111, variant ? "all"
1212, extraConfigureFlags ? [ ]
13+ , enableARMCryptoExtensions ? stdenv . hostPlatform . isAarch64 && ( ( builtins . match "^.*\\ +crypto.*$" stdenv . hostPlatform . gcc . arch ) != null )
1314, enableLto ? ! ( stdenv . hostPlatform . isStatic || stdenv . cc . isClang )
1415} :
1516stdenv . mkDerivation ( finalAttrs : {
1617 pname = "wolfssl-${ variant } " ;
17- version = "5.7.2 " ;
18+ version = "5.7.4 " ;
1819
1920 src = fetchFromGitHub {
2021 owner = "wolfSSL" ;
2122 repo = "wolfssl" ;
2223 rev = "refs/tags/v${ finalAttrs . version } -stable" ;
23- hash = "sha256-VTMVgBSDL6pw1eEKnxGzTdyQYWVbMd3mAnOnpAOKVhk =" ;
24+ hash = "sha256-/dtW1E1wYfQEuotclUEOK5+Vg4S7vt1xWhr1lEtu60w =" ;
2425 } ;
2526
2627 postPatch = ''
2728 patchShebangs ./scripts
28- # ocsp stapling tests require network access, so skip them
29- sed -i -e'2s/.*/exit 77/' scripts/ocsp-stapling.test
3029 # ensure test detects musl-based systems too
3130 substituteInPlace scripts/ocsp-stapling2.test \
3231 --replace '"linux-gnu"' '"linux-"'
@@ -54,10 +53,11 @@ stdenv.mkDerivation (finalAttrs: {
5453 # Enable AVX/AVX2/AES-NI instructions, gated by runtime detection via CPUID.
5554 "--enable-intelasm"
5655 "--enable-aesni"
57- ] ++ lib . optionals ( stdenv . hostPlatform . isAarch64 && stdenv . hostPlatform . isDarwin ) [
56+ ] ++ lib . optionals ( stdenv . hostPlatform . isAarch64 ) [
5857 # No runtime detection under ARM and no platform function checks like for X86.
59- # However, all ARM macOS systems have the supported extensions autodetected in the configure script.
60- "--enable-armasm=inline"
58+ ( if enableARMCryptoExtensions
59+ then "--enable-armasm=inline"
60+ else "--disable-armasm" )
6161 ] ++ extraConfigureFlags ;
6262
6363 # Breaks tls13 tests on aarch64-darwin.
@@ -67,6 +67,9 @@ stdenv.mkDerivation (finalAttrs: {
6767 env . NIX_CFLAGS_COMPILE = lib . optionalString enableLto "-flto" ;
6868 env . NIX_LDFLAGS_COMPILE = lib . optionalString enableLto "-flto" ;
6969
70+ # Don't attempt connections to external services in the test suite.
71+ env . WOLFSSL_EXTERNAL_TEST = "0" ;
72+
7073 outputs = [
7174 "dev"
7275 "doc"
0 commit comments