about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@nextrem.ch>2024-04-08 21:53:43 +0200
committerGitHub <noreply@github.com>2024-04-08 21:53:43 +0200
commitf955c9236358706af5c370b2d9d88e23cdad6fd4 (patch)
treef053e018e6bd26c33142653dbcf21fac42751ee9 /pkgs/by-name
parent47afcfe5aed6263ce91d1186a3090acda29e8125 (diff)
parent48562415281958ca585bda0fe605dfc06c60e642 (diff)
Merge pull request #265409 from 8aed/patch-init-passt
init: passt at 2023_11_10
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/pa/passt/package.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/by-name/pa/passt/package.nix b/pkgs/by-name/pa/passt/package.nix
new file mode 100644
index 0000000000000..e577b2152503c
--- /dev/null
+++ b/pkgs/by-name/pa/passt/package.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchgit }:
+
+stdenv.mkDerivation {
+  pname = "passt";
+  version = "0.2023_11_10.5ec3634";
+  src = fetchgit {
+    url = "git://passt.top/passt";
+    rev = "5ec3634b07215337c2e69d88f9b1d74711897d7d";
+    hash = "sha256-76CD9PYD/NcBkmRYFSZaYl381QJjuWo0VsNdh31d6/M=";
+  };
+  nativeBuildInputs = [ ];
+  buildInputs = [];
+  installPhase = ''
+    runHook preInstall
+    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.hostPlatform.avx2Support ''
+    cp passt.avx2 pasta.avx2 $out/bin/
+    runHook postInstall
+  '');
+  meta = with lib; {
+    homepage = "https://passt.top/passt/about/";
+    description = "Translation layer between a Layer-2 network interface and native Layer-4 sockets";
+    longDescription = ''
+      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 ];
+  };
+}