vde2: switch to Mbed TLS

Since wolfSSL ≥ 5.8.2 is `GPL-3.0-or-later` and VDEv2 is
`GPL-2.0-only`, it’s a licence violation to redistribute binaries
combining them.

Thankfully, upstream has added support for Mbed TLS, though not yet cut
a stable release with it. Backport the patch and switch to it. This
also avoids pulling wolfSSL unnecessarily into the QEMU closure,
which already contains Mbed TLS. It also conveniently fixes the build
on Darwin.
This commit is contained in:
Emily
2026-04-03 16:57:30 +01:00
parent 42c772cf00
commit 3d669a98fb
+13 -2
View File
@@ -5,7 +5,7 @@
fetchpatch,
autoreconfHook,
libpcap,
wolfssl,
mbedtls,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -20,6 +20,13 @@ stdenv.mkDerivation (finalAttrs: {
};
patches = [
# See: <https://github.com/virtualsquare/vde-2/issues/69>
(fetchpatch {
name = "vde2-backport-mbedtls-support.patch";
url = "https://github.com/virtualsquare/vde-2/commit/e3f701978a0a20e56cd9829353d110d4ddcedd90.patch";
hash = "sha256-cq3yrA3w/K6J+RtwYX9AcG/nfctlAkc3aYJZpJxJXTQ=";
})
(fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238";
sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af";
@@ -34,7 +41,11 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libpcap
wolfssl
mbedtls
];
configureFlags = [
"--with-crypt=mbedtls"
];
meta = {