Merge pull request #302697 from marsam/refactor-passt

passt: 0.2023_11_10.5ec3634 -> 2024_04_05.954589b
This commit is contained in:
Mario Rodas 2024-04-09 00:11:04 -05:00 committed by GitHub
commit 53d6d286e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,27 +1,37 @@
{ stdenv, lib, fetchgit }: { lib
, stdenv
, fetchurl
, gitUpdater
, testers
}:
stdenv.mkDerivation { stdenv.mkDerivation (finalAttrs: {
pname = "passt"; pname = "passt";
version = "0.2023_11_10.5ec3634"; version = "2024_04_05.954589b";
src = fetchgit {
url = "git://passt.top/passt"; src = fetchurl {
rev = "5ec3634b07215337c2e69d88f9b1d74711897d7d"; url = "https://passt.top/passt/snapshot/passt-${finalAttrs.version}.tar.gz";
hash = "sha256-76CD9PYD/NcBkmRYFSZaYl381QJjuWo0VsNdh31d6/M="; hash = "sha256-lwiHjr7rv1xBwXktKAsYIjDzNDkHGjZsW/FsQyFbLng=";
}; };
nativeBuildInputs = [ ];
buildInputs = []; makeFlags = [
installPhase = '' "prefix=${placeholder "out"}"
runHook preInstall "VERSION=${finalAttrs.version}"
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/ passthru = {
'' + (lib.optionalString stdenv.hostPlatform.avx2Support '' tests.version = testers.testVersion {
cp passt.avx2 pasta.avx2 $out/bin/ package = finalAttrs.finalPackage;
runHook postInstall };
'');
updateScript = gitUpdater {
url = "https://passt.top/passt";
};
};
meta = with lib; { meta = with lib; {
homepage = "https://passt.top/passt/about/"; homepage = "https://passt.top/passt/about/";
description = "Translation layer between a Layer-2 network interface and native Layer-4 sockets"; description = "Plug A Simple Socket Transport";
longDescription = '' longDescription = ''
passt implements a translation layer between a Layer-2 network interface passt implements a translation layer between a Layer-2 network interface
and native Layer-4 sockets (TCP, UDP, ICMP/ICMPv6 echo) on a host. and native Layer-4 sockets (TCP, UDP, ICMP/ICMPv6 echo) on a host.
@ -34,8 +44,9 @@ stdenv.mkDerivation {
interfaces on the host, hence not requiring any capabilities or interfaces on the host, hence not requiring any capabilities or
privileges. privileges.
''; '';
license = lib.licenses.gpl2Plus; license = [ licenses.bsd3 /* and */ licenses.gpl2Plus ];
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ _8aed ]; maintainers = with maintainers; [ _8aed ];
mainProgram = "passt";
}; };
} })