From c2d1fd0952020a163321326204795215e022292b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 15 Sep 2025 12:22:31 +0200 Subject: [PATCH 1/2] sniffnet: 1.3.2 -> 1.4.1 Diff: https://github.com/gyulyvgc/sniffnet/compare/v1.3.2...v1.4.1 Changelog: https://github.com/gyulyvgc/sniffnet/blob/v1.4.1/CHANGELOG.md --- pkgs/by-name/sn/sniffnet/package.nix | 36 ++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/sn/sniffnet/package.nix b/pkgs/by-name/sn/sniffnet/package.nix index 589e68c4978d..68fc9fde2648 100644 --- a/pkgs/by-name/sn/sniffnet/package.nix +++ b/pkgs/by-name/sn/sniffnet/package.nix @@ -1,32 +1,41 @@ { lib, + stdenv, rustPlatform, fetchFromGitHub, + + # nativeBuildInputs pkg-config, + + # buildInputs libpcap, - libxkbcommon, openssl, - stdenv, alsa-lib, expat, fontconfig, vulkan-loader, - wayland, xorg, + + # wrapper + libxkbcommon, + wayland, + + # tests + versionCheckHook, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "sniffnet"; - version = "1.3.2"; + version = "1.4.1"; src = fetchFromGitHub { owner = "gyulyvgc"; repo = "sniffnet"; - tag = "v${version}"; - hash = "sha256-MWYCXLIv0euEHkfqZCxbfs1wFHkGIFk06wn7F8CIXx0="; + tag = "v${finalAttrs.version}"; + hash = "sha256-EgnFDF+K8qGjunWB20VA8bXLzNvyGzcIaim+smhW5fU="; }; - cargoHash = "sha256-M7vIiGdH5+rdlqi603bfcXZavUAx2tU7+4sXb+QG+2g="; + cargoHash = "sha256-22P1EeZ2FqwIHjr23oJCKvg3ggT1Me93goELwZ/B9S4="; nativeBuildInputs = [ pkg-config ]; @@ -51,6 +60,7 @@ rustPlatform.buildRustPackage rec { # requires internet access checkFlags = [ "--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github" + "--skip=utils::check_updates::tests::fetch_latest_release_from_github" ]; postInstall = '' @@ -75,10 +85,16 @@ rustPlatform.buildRustPackage rec { } ''; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + meta = { description = "Cross-platform application to monitor your network traffic with ease"; homepage = "https://github.com/gyulyvgc/sniffnet"; - changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ mit # or asl20 @@ -86,4 +102,4 @@ rustPlatform.buildRustPackage rec { maintainers = with lib.maintainers; [ figsoda ]; mainProgram = "sniffnet"; }; -} +}) From 8907f31de0ebd8d6026610d6fba0f128b88be320 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 15 Sep 2025 13:13:50 +0200 Subject: [PATCH 2/2] sniffnet: add ngi to meta.teams --- pkgs/by-name/sn/sniffnet/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/sn/sniffnet/package.nix b/pkgs/by-name/sn/sniffnet/package.nix index 68fc9fde2648..8b4abb822aa9 100644 --- a/pkgs/by-name/sn/sniffnet/package.nix +++ b/pkgs/by-name/sn/sniffnet/package.nix @@ -100,6 +100,7 @@ rustPlatform.buildRustPackage (finalAttrs: { asl20 ]; maintainers = with lib.maintainers; [ figsoda ]; + teams = [ lib.teams.ngi ]; mainProgram = "sniffnet"; }; })