-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add passt, a userspace network stack that can be use to provide unprivileged network access for virtual machines (using 'passt') or containers (using 'pasta'). See https://passt.top/passt/about/
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ stdenv, lib, pkg-config }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "passt"; | ||
version = "0.2023_10_04"; | ||
src = builtins.fetchGit { | ||
url = "https://passt.top/passt"; | ||
rev = "f851084c96e0a932e51c15ad9551e2cd85362147"; | ||
}; | ||
nativeBuildInputs = [ pkg-config ]; | ||
buildInputs = []; | ||
installPhase = '' | ||
mkdir -p $out/bin $out/share/man/man1 | ||
cp passt pasta qrap $out/bin/ | ||
cp passt.1 pasta.1 qrap.1 $out/share/man/man1/ | ||
'' + (lib.optionalString (stdenv.targetPlatform == "x86_64") '' | ||
cp passt.avx2 pasta.avx2 $out/bin/ | ||
''); | ||
meta = with lib; { | ||
homepage = "https://passt.top/passt/about/"; | ||
description = '' | ||
passt implements a translation layer between a Layer-2 network interface | ||
and native Layer-4 sockets (TCP, UDP, ICMP/ICMPv6 echo) on a host. | ||
It doesn't require any capabilities or privileges, and it can be used as | ||
a simple replacement for Slirp. | ||
pasta (same binary as passt, different command) offers equivalent | ||
functionality, for network namespaces: traffic is forwarded using a tap | ||
interface inside the namespace, without the need to create further | ||
interfaces on the host, hence not requiring any capabilities or | ||
privileges. | ||
''; | ||
license = lib.licenses.gpl2Plus; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ 8aed ]; | ||
}; | ||
} |