about summary refs log tree commit diff
path: root/pkgs/applications/networking/sniffers
diff options
context:
space:
mode:
authorQuantMint <quantmint@protonmail.com>2023-03-04 13:18:41 +0100
committerQuantMint <quantmint@protonmail.com>2023-03-04 13:18:41 +0100
commita75ef43adfb56aeefa78bfe29a4acb5154446efd (patch)
tree8a34205df353fcd7cf59e0ce208db66b872fc704 /pkgs/applications/networking/sniffers
parent3c5319ad3aa51551182ac82ea17ab1c6b0f0df89 (diff)
downloadnixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar.gz
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar.bz2
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar.lz
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar.xz
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.tar.zst
nixlib-a75ef43adfb56aeefa78bfe29a4acb5154446efd.zip
wireshark: format
Diffstat (limited to 'pkgs/applications/networking/sniffers')
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix101
1 files changed, 71 insertions, 30 deletions
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index 5d69667f1bfb..b12e5ba4fb5c 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -1,18 +1,46 @@
-{ lib, stdenv, buildPackages, fetchurl, pkg-config, pcre2, perl, flex, bison
-, gettext, libpcap, libnl, c-ares, gnutls, libgcrypt, libgpg-error, geoip, openssl
-, lua5, python3, libcap, glib, libssh, nghttp2, zlib, cmake, makeWrapper, wrapGAppsHook
-, withQt ? true, qt5 ? null
-, ApplicationServices, SystemConfiguration, gmp
+{ lib
+, stdenv
+, buildPackages
+, fetchurl
+, pkg-config
+, pcre2
+, perl
+, flex
+, bison
+, gettext
+, libpcap
+, libnl
+, c-ares
+, gnutls
+, libgcrypt
+, libgpg-error
+, geoip
+, openssl
+, lua5
+, python3
+, libcap
+, glib
+, libssh
+, nghttp2
+, zlib
+, cmake
+, makeWrapper
+, wrapGAppsHook
+, withQt ? true
+, qt5 ? null
+, ApplicationServices
+, SystemConfiguration
+, gmp
 , asciidoctor
 }:
 
-assert withQt  -> qt5  != null;
+assert withQt -> qt5 != null;
 
 let
   version = "4.0.3";
   variant = if withQt then "qt" else "cli";
-
-in stdenv.mkDerivation {
+in
+stdenv.mkDerivation {
   pname = "wireshark-${variant}";
   inherit version;
   outputs = [ "out" "dev" ];
@@ -42,12 +70,24 @@ in stdenv.mkDerivation {
   depsBuildBuild = [ buildPackages.stdenv.cc ];
 
   buildInputs = [
-    gettext pcre2 libpcap lua5 libssh nghttp2 openssl libgcrypt
-    libgpg-error gnutls geoip c-ares glib zlib
-  ] ++ lib.optionals withQt  (with qt5; [ qtbase qtmultimedia qtsvg qttools qtwayland ])
-    ++ lib.optionals stdenv.isLinux  [ libcap libnl ]
-    ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ]
-    ++ lib.optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]);
+    gettext
+    pcre2
+    libpcap
+    lua5
+    libssh
+    nghttp2
+    openssl
+    libgcrypt
+    libgpg-error
+    gnutls
+    geoip
+    c-ares
+    glib
+    zlib
+  ] ++ lib.optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools qtwayland ])
+  ++ lib.optionals stdenv.isLinux [ libcap libnl ]
+  ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ]
+  ++ lib.optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]);
 
   strictDeps = true;
 
@@ -70,22 +110,23 @@ in stdenv.mkDerivation {
             install_name_tool -change "$dylib" "$out/lib/$dylib" "$f"
         done
     done
-  '' else lib.optionalString withQt ''
-    pwd
-    install -Dm644 -t $out/share/applications ../resources/freedesktop/org.wireshark.Wireshark.desktop
-
-    install -Dm644 ../resources/icons/wsicon.svg $out/share/icons/wireshark.svg
-    mkdir -pv $dev/include/{epan/{wmem,ftypes,dfilter},wsutil/wmem,wiretap}
-
-    cp config.h $dev/include/wireshark/
-    cp ../epan/*.h $dev/include/epan/
-    cp ../epan/ftypes/*.h $dev/include/epan/ftypes/
-    cp ../epan/dfilter/*.h $dev/include/epan/dfilter/
-    cp ../include/ws_*.h $dev/include/
-    cp ../wiretap/*.h $dev/include/wiretap/
-    cp ../wsutil/*.h $dev/include/wsutil/
-    cp ../wsutil/wmem/*.h $dev/include/wsutil/wmem/
-  '');
+  '' else
+    lib.optionalString withQt ''
+      pwd
+      install -Dm644 -t $out/share/applications ../resources/freedesktop/org.wireshark.Wireshark.desktop
+
+      install -Dm644 ../resources/icons/wsicon.svg $out/share/icons/wireshark.svg
+      mkdir -pv $dev/include/{epan/{wmem,ftypes,dfilter},wsutil/wmem,wiretap}
+
+      cp config.h $dev/include/wireshark/
+      cp ../epan/*.h $dev/include/epan/
+      cp ../epan/ftypes/*.h $dev/include/epan/ftypes/
+      cp ../epan/dfilter/*.h $dev/include/epan/dfilter/
+      cp ../include/ws_*.h $dev/include/
+      cp ../wiretap/*.h $dev/include/wiretap/
+      cp ../wsutil/*.h $dev/include/wsutil/
+      cp ../wsutil/wmem/*.h $dev/include/wsutil/wmem/
+    '');
 
   dontFixCmake = true;