nixpkgs-suyu/pkgs/tools/networking/vde2/default.nix

39 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchpatch, openssl, libpcap, python2, withPython ? false }:
stdenv.mkDerivation rec {
name = "vde2-2.3.2";
src = fetchurl {
url = "mirror://sourceforge/vde/vde2/2.3.1/${name}.tar.gz";
sha256 = "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2";
};
2020-02-24 23:06:41 +01: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";
})
2021-01-15 10:19:50 +01:00
] ++ lib.optional stdenv.hostPlatform.isMusl [
2020-02-24 23:06:41 +01:00
(fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238";
2018-03-25 04:16:02 +02:00
sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af";
2020-02-24 23:06:41 +01:00
})
];
2018-03-25 04:16:02 +02:00
2021-01-15 10:19:50 +01:00
configureFlags = lib.optional (!withPython) "--disable-python";
2018-03-25 04:16:02 +02:00
buildInputs = [ openssl libpcap ]
2021-01-15 10:19:50 +01:00
++ lib.optional withPython python2;
hardeningDisable = [ "format" ];
2015-12-23 02:59:47 +01:00
meta = with lib; {
2020-02-25 00:36:50 +01:00
homepage = "https://github.com/virtualsquare/vde-2";
description = "Virtual Distributed Ethernet, an Ethernet compliant virtual network";
2018-09-10 21:49:56 +02:00
platforms = platforms.unix;
license = licenses.gpl2;
};
}