From 80823874927a60e0712c247aae0cb861dd81c53f Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Wed, 24 Jan 2024 20:38:39 +0100 Subject: [PATCH] sniffglue: enable darwin support --- pkgs/tools/networking/sniffglue/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/sniffglue/default.nix b/pkgs/tools/networking/sniffglue/default.nix index be6a95f4e928..a17ecad26066 100644 --- a/pkgs/tools/networking/sniffglue/default.nix +++ b/pkgs/tools/networking/sniffglue/default.nix @@ -1,4 +1,11 @@ -{ lib, fetchFromGitHub, rustPlatform, libpcap, libseccomp, pkg-config }: +{ lib +, fetchFromGitHub +, libpcap +, libseccomp +, pkg-config +, rustPlatform +, stdenv +}: rustPlatform.buildRustPackage rec { pname = "sniffglue"; @@ -15,13 +22,17 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libpcap libseccomp ]; + buildInputs = [ + libpcap + ] ++ lib.optionals stdenv.isLinux [ + libseccomp + ]; meta = with lib; { description = "Secure multithreaded packet sniffer"; homepage = "https://github.com/kpcyrd/sniffglue"; license = licenses.gpl3Plus; maintainers = with maintainers; [ xrelkd ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; }