nixpkgs/pkgs/tools/networking/ubridge/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.3 KiB
Nix
Raw Normal View History

2023-09-21 08:43:15 +00:00
{ lib
, stdenv
, fetchFromGitHub
2019-01-10 18:41:38 +00:00
, libpcap
2023-09-21 08:43:15 +00:00
, testers
, ubridge
2019-01-10 18:41:38 +00:00
}:
stdenv.mkDerivation rec {
pname = "ubridge";
2020-03-27 10:07:29 +00:00
version = "0.9.18";
2019-01-10 18:41:38 +00:00
src = fetchFromGitHub {
owner = "GNS3";
repo = "ubridge";
rev = "v${version}";
2020-03-27 10:07:29 +00:00
sha256 = "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn";
2019-01-10 18:41:38 +00:00
};
postPatch = ''
substituteInPlace Makefile \
--replace "/usr/local/bin" "$out/bin" \
--replace "setcap" "#setcap"
'';
buildInputs = [ libpcap ];
2023-09-21 08:43:22 +00:00
installPhase = ''
runHook preInstall
2019-01-10 18:41:38 +00:00
mkdir -p $out/bin
2023-09-21 08:43:22 +00:00
install -Dm755 ubridge $out/bin/ubridge
runHook postInstall
2019-01-10 18:41:38 +00:00
'';
2023-09-21 08:43:15 +00:00
passthru = {
tests.version = testers.testVersion {
package = ubridge;
command = "ubridge -v";
};
};
meta = with lib; {
2019-01-10 18:41:38 +00:00
description = "Bridge for UDP tunnels, Ethernet, TAP, and VMnet interfaces";
longDescription = ''
uBridge is a simple application to create user-land bridges between
various technologies. Currently bridging between UDP tunnels, Ethernet
and TAP interfaces is supported. Packet capture is also supported.
'';
inherit (src.meta) homepage;
2020-03-24 15:27:20 +00:00
changelog = "https://github.com/GNS3/ubridge/releases/tag/v${version}";
2019-01-10 18:41:38 +00:00
license = licenses.gpl3Plus;
2023-09-21 08:45:12 +00:00
mainProgram = "ubridge";
2019-01-10 18:41:38 +00:00
maintainers = with maintainers; [ primeos ];
2023-09-21 08:43:22 +00:00
platforms = platforms.linux ++ platforms.darwin;
2019-01-10 18:41:38 +00:00
};
}