1 { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libpcap, wolfssl }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "virtualsquare";
11 sha256 = "sha256-Yf6QB7j5lYld2XtqhYspK4037lTtimoFc7nCavCP+mU=";
14 patches = lib.optionals stdenv.hostPlatform.isMusl [
16 url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238";
17 sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af";
21 preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
22 MACOSX_DEPLOYMENT_TARGET=10.16
25 nativeBuildInputs = [ autoreconfHook ];
27 buildInputs = [ libpcap wolfssl ];
30 homepage = "https://github.com/virtualsquare/vde-2";
31 description = "Virtual Distributed Ethernet, an Ethernet compliant virtual network";
32 platforms = platforms.unix;
33 license = licenses.gpl2;