about summary refs log tree commit diff
path: root/pkgs/by-name/pa
diff options
context:
space:
mode:
authorWeijia Wang2024-04-09 08:26:23 +0200
committerWeijia Wang2024-04-09 08:26:23 +0200
commit3f59355d8466fc2b1cfe45cd21e4476a686bfeaf (patch)
treee3f355b60c44bab4ddf55f4a87836c88abf738b1 /pkgs/by-name/pa
parentf682fc1115301f70586f107573d2e4705cb238dd (diff)
parent038c0347a0d39cb187d76260785b610f05706a23 (diff)
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/by-name/pa')
-rw-r--r--pkgs/by-name/pa/passt/package.nix52
1 files changed, 52 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 000000000000..3ce1715d2a36
--- /dev/null
+++ b/pkgs/by-name/pa/passt/package.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchurl
+, gitUpdater
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "passt";
+  version = "2024_04_05.954589b";
+
+  src = fetchurl {
+    url = "https://passt.top/passt/snapshot/passt-${finalAttrs.version}.tar.gz";
+    hash = "sha256-lwiHjr7rv1xBwXktKAsYIjDzNDkHGjZsW/FsQyFbLng=";
+  };
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+    "VERSION=${finalAttrs.version}"
+  ];
+
+  passthru = {
+    tests.version = testers.testVersion {
+      package = finalAttrs.finalPackage;
+    };
+
+    updateScript = gitUpdater {
+      url = "https://passt.top/passt";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://passt.top/passt/about/";
+    description = "Plug A Simple Socket Transport";
+    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 = [ licenses.bsd3 /* and */ licenses.gpl2Plus ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ _8aed ];
+    mainProgram = "passt";
+  };
+})