2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, openssl, libpcap, python2, withPython ? false }:
|
2011-01-12 13:39:17 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-01 19:11:18 +01:00
|
|
|
pname = "vde2";
|
|
|
|
version = "2.3.2";
|
2011-01-12 13:39:17 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-01 19:11:18 +01:00
|
|
|
url = "mirror://sourceforge/vde/vde2/${version}/vde2-${version}.tar.gz";
|
2011-12-09 11:14:02 +00:00
|
|
|
sha256 = "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2";
|
2011-01-12 13:39:17 +00:00
|
|
|
};
|
|
|
|
|
2020-02-24 22:06:41 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build with openssl 1.1.0
|
|
|
|
(fetchpatch {
|
|
|
|
name = "vde_cryptcab-compile-against-openssl-1.1.0.patch";
|
2021-07-14 01:41:39 +01:00
|
|
|
url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/15b11be49997fa94b603e366064690b7cc6bce61/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch";
|
2020-02-24 22:06:41 +00:00
|
|
|
sha256 = "07z1yabwigq35mkwzqa934n7vjnjlqz5xfzq8cfj87lgyjjp00qi";
|
|
|
|
})
|
2021-01-15 09:19:50 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isMusl [
|
2020-02-24 22:06:41 +00:00
|
|
|
(fetchpatch {
|
2020-05-15 16:58:27 +01:00
|
|
|
url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238";
|
2018-03-25 03:16:02 +01:00
|
|
|
sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af";
|
2020-02-24 22:06:41 +00:00
|
|
|
})
|
|
|
|
];
|
2018-03-25 03:16:02 +01:00
|
|
|
|
2021-02-25 03:49:15 +00:00
|
|
|
preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=10.16
|
|
|
|
'';
|
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
configureFlags = lib.optional (!withPython) "--disable-python";
|
2018-03-25 03:16:02 +01:00
|
|
|
|
2019-08-25 17:06:33 +01:00
|
|
|
buildInputs = [ openssl libpcap ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optional withPython python2;
|
2011-01-12 13:39:17 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2021-10-20 17:14:51 +01:00
|
|
|
# Disable parallel build as it fails as:
|
|
|
|
# make: *** No rule to make target '../../src/lib/libvdemgmt.la',
|
|
|
|
# needed by 'libvdesnmp.la'. Stop.
|
|
|
|
# Next release should address it with
|
|
|
|
# https://github.com/virtualsquare/vde-2/commit/7dd9ed46d5dca125ca45d679ac9f3acbfb0f9300.patch
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-24 23:36:50 +00:00
|
|
|
homepage = "https://github.com/virtualsquare/vde-2";
|
2011-01-12 13:39:17 +00:00
|
|
|
description = "Virtual Distributed Ethernet, an Ethernet compliant virtual network";
|
2018-09-10 20:49:56 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2;
|
2011-01-12 13:39:17 +00:00
|
|
|
};
|
|
|
|
}
|