mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
e92a5c7766
Diff: https://github.com/gyulyvgc/sniffnet/compare/refs/tags/v1.2.0...v1.2.1 Changelog: https://github.com/gyulyvgc/sniffnet/blob/v1.2.1/CHANGELOG.md
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, libpcap
|
|
, openssl
|
|
, stdenv
|
|
, alsa-lib
|
|
, expat
|
|
, fontconfig
|
|
, vulkan-loader
|
|
, xorg
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "sniffnet";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gyulyvgc";
|
|
repo = "sniffnet";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-IJfXQ/d1amm6rCdArWoHXFhN9s//7hYoWMt66mv4Bbw=";
|
|
};
|
|
|
|
cargoHash = "sha256-FMpTHm8eEXnVfMMY1iUkJPnRRK10u9l8tCaemM6L1gE=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
libpcap
|
|
openssl
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
alsa-lib
|
|
expat
|
|
fontconfig
|
|
vulkan-loader
|
|
xorg.libX11
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
xorg.libXrandr
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
# requires internet access
|
|
checkFlags = [
|
|
"--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github"
|
|
];
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
patchelf $out/bin/sniffnet \
|
|
--add-rpath ${lib.makeLibraryPath [ vulkan-loader xorg.libX11 ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|