2019-08-25 19:06:33 +03:00
|
|
|
{ stdenv, fetchurl, fetchpatch, openssl, libpcap, python2, withPython ? false }:
|
2011-01-12 16:39:17 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-12-09 15:14:02 +04:00
|
|
|
name = "vde2-2.3.2";
|
2011-01-12 16:39:17 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/vde/vde2/2.3.1/${name}.tar.gz";
|
2011-12-09 15:14:02 +04:00
|
|
|
sha256 = "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2";
|
2011-01-12 16:39:17 +03:00
|
|
|
};
|
|
|
|
|
2020-02-25 01:06:41 +03:00
|
|
|
patches = [
|
|
|
|
# Fix build with openssl 1.1.0
|
|
|
|
(fetchpatch {
|
|
|
|
name = "vde_cryptcab-compile-against-openssl-1.1.0.patch";
|
|
|
|
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch?h=packages/vde2&id=15b11be49997fa94b603e366064690b7cc6bce61";
|
|
|
|
sha256 = "07z1yabwigq35mkwzqa934n7vjnjlqz5xfzq8cfj87lgyjjp00qi";
|
|
|
|
})
|
|
|
|
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl [
|
|
|
|
(fetchpatch {
|
2020-05-15 18:58:27 +03:00
|
|
|
url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238";
|
2018-03-25 05:16:02 +03:00
|
|
|
sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af";
|
2020-02-25 01:06:41 +03:00
|
|
|
})
|
|
|
|
];
|
2018-03-25 05:16:02 +03:00
|
|
|
|
2019-11-20 11:21:30 +03:00
|
|
|
configureFlags = stdenv.lib.optional (!withPython) "--disable-python";
|
2018-03-25 05:16:02 +03:00
|
|
|
|
2019-08-25 19:06:33 +03:00
|
|
|
buildInputs = [ openssl libpcap ]
|
|
|
|
++ stdenv.lib.optional withPython python2;
|
2011-01-12 16:39:17 +03:00
|
|
|
|
2016-02-26 20:38:15 +03:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 04:59:47 +03:00
|
|
|
|
2018-09-10 22:49:56 +03:00
|
|
|
meta = with stdenv.lib; {
|
2020-02-25 02:36:50 +03:00
|
|
|
homepage = "https://github.com/virtualsquare/vde-2";
|
2011-01-12 16:39:17 +03:00
|
|
|
description = "Virtual Distributed Ethernet, an Ethernet compliant virtual network";
|
2018-09-10 22:49:56 +03:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2;
|
2011-01-12 16:39:17 +03:00
|
|
|
};
|
|
|
|
}
|