Unverified Commit 89be28ba authored by Emily's avatar Emily Committed by GitHub
Browse files

{wolfssl,vde2}: correct `meta.license`; vde2: switch to Mbed TLS (#504446)

parents 8e62946b 3d669a98
Loading
Loading
Loading
Loading
+21 −8
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
  fetchpatch,
  autoreconfHook,
  libpcap,
  wolfssl,
  mbedtls,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -19,7 +19,14 @@ stdenv.mkDerivation (finalAttrs: {
    sha256 = "sha256-Yf6QB7j5lYld2XtqhYspK4037lTtimoFc7nCavCP+mU=";
  };

  patches = lib.optionals stdenv.hostPlatform.isMusl [
  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";
@@ -30,21 +37,27 @@ stdenv.mkDerivation (finalAttrs: {
  # https://github.com/virtualsquare/vde-2/commit/fedcb99c5f44c397f459ed0951a8fba4f4effb73
  env.NIX_CFLAGS_COMPILE = "-std=gnu17";

  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
    MACOSX_DEPLOYMENT_TARGET=10.16
  '';

  nativeBuildInputs = [ autoreconfHook ];

  buildInputs = [
    libpcap
    wolfssl
    mbedtls
  ];

  configureFlags = [
    "--with-crypt=mbedtls"
  ];

  meta = {
    homepage = "https://github.com/virtualsquare/vde-2";
    description = "Virtual Distributed Ethernet, an Ethernet compliant virtual network";
    platforms = lib.platforms.unix;
    license = lib.licenses.gpl2Plus;
    license = [
      # Effectively `lib.licenses.gpl2Only`, but file headers differ.
      lib.licenses.gpl2Plus
      lib.licenses.gpl2Only
      # libvdeplug and code copied from glibc.
      lib.licenses.lgpl21Plus
    ];
  };
})
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://www.wolfssl.com/";
    changelog = "https://github.com/wolfSSL/wolfssl/releases/tag/v${finalAttrs.version}-stable";
    platforms = lib.platforms.all;
    license = lib.licenses.gpl2Plus;
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [
      fab
      vifino