mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +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
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, perl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nat-traverse";
|
|
version = "0.7";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.speicherleck.de/iblech/nat-traverse/nat-traverse-${version}.tar.bz2";
|
|
sha256 = "0knwnqsjwv7sa5wjb863ghabs7s269a73qwkmxpsbngjw9s0j2ih";
|
|
};
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
cp nat-traverse $out/bin
|
|
gzip -c nat-traverse.1 > $out/share/man/man1/nat-traverse.1.gz
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "NAT gateway traversal utility";
|
|
longDescription = ''
|
|
nat-traverse establishes direct connections between nodes which are
|
|
behind NAT gateways, i.e. hosts which do not have public IP addresses.
|
|
This is done using an UDP NAT traversal technique. Additionally, it's
|
|
possible to setup a small VPN by using pppd on top of nat-traverse.
|
|
|
|
nat-traverse does not need an external server on the Internet, and it
|
|
isn't necessary to reconfigure the involved NAT gateways, either.
|
|
nat-traverse works out-of-the-box.
|
|
'';
|
|
homepage = "https://www.speicherleck.de/iblech/nat-traverse/";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.iblech ];
|
|
};
|
|
}
|