push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{
ndpi,
fetchFromGitHub,
lib,
stdenv,
autoreconfHook,
autoconf,
automake,
fixDarwinDylibNames,
}:
ndpi.overrideAttrs (
finalAttrs: prevAttrs: {
version = "4.0";
src = fetchFromGitHub {
inherit (prevAttrs.src) owner repo;
tag = finalAttrs.version;
hash = "sha256-vWx6IVyxPJBgOkXpHdnvstvDGJbAtndFPtowpjLd32o=";
};
configureScript = "./autogen.sh";
nativeBuildInputs =
lib.remove autoreconfHook prevAttrs.nativeBuildInputs
++ [
autoconf
automake
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ];
}
)

View File

@@ -0,0 +1,91 @@
{
lib,
callPackage,
buildGoModule,
fetchFromGitHub,
withDpi ? true,
libpcap,
libprotoident,
libflowmanager,
libtrace,
versionCheckHook,
nix-update-script,
}:
let
ndpi = callPackage ./ndpi_4_0.nix { };
in
buildGoModule (finalAttrs: {
pname = "netcap";
version = "0.6.11";
src = fetchFromGitHub {
owner = "dreadl0ck";
repo = "netcap";
tag = "v${finalAttrs.version}";
hash = "sha256-SCBKOIC/s+rfrVWmryp9EBp7ARpZZcxymsnZWtEHrhk=";
};
vendorHash = "sha256-MvHrJLhcFA0fEgK+YT0rwI6wIwTGMcLWQt6AYkx1eZM=";
subPackages = [ "cmd" ];
buildInputs = [
libpcap
]
++ lib.optionals withDpi [
ndpi
libprotoident
libflowmanager
libtrace
];
ldflags = [
"-s -w"
];
tags = lib.optionals (!withDpi) [
"nodpi"
];
CGO_LDFLAGS = lib.optionalString withDpi ''
-L${ndpi}/lib -lndpi
-L${libprotoident}/lib -lndpi
'';
CGO_CFLAGS = lib.optionalString withDpi ''
-I${ndpi}/include
-I${libprotoident}/include
'';
postInstall = ''
mv $out/bin/cmd $out/bin/net
'';
checkFlags =
let
skippedTests = [
# couldn't open packet socket: operation not permitted
"TestCaptureLive"
# requires local test data
"TestCapturePCAP"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/net";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Framework for secure and scalable network traffic analysis";
homepage = "https://netcap.io";
downloadPage = "https://github.com/dreadl0ck/netcap";
changelog = "https://github.com/dreadl0ck/netcap/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ felbinger ];
mainProgram = "net";
};
})