mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, libpcap
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ubridge";
|
|
version = "0.9.18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "GNS3";
|
|
repo = "ubridge";
|
|
rev = "v${version}";
|
|
sha256 = "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "/usr/local/bin" "$out/bin" \
|
|
--replace "setcap" "#setcap"
|
|
'';
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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;
|
|
changelog = "https://github.com/GNS3/ubridge/releases/tag/v${version}";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ primeos ];
|
|
};
|
|
}
|