summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuantMint <quantmint@protonmail.com>2023-03-04 13:18:41 +0100
committerRobert Scott <code@humanleg.org.uk>2023-04-09 16:27:52 +0100
commit25eabcf8aa0419534299529b6121878612d20dc9 (patch)
tree74f507ebe4692ef00be6968fd71fd17866e0b3b2
parentMerge branch 'staging-next-22.11' into release-22.11 (diff)
downloadnixpkgs-25eabcf8aa0419534299529b6121878612d20dc9.tar.gz
wireshark: format
(cherry picked from commit a75ef43adfb56aeefa78bfe29a4acb5154446efd)
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix97
1 files changed, 69 insertions, 28 deletions
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index c357723a1875..445acc8d6844 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -1,20 +1,48 @@
-{ 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;
with lib;
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" ];
@@ -44,12 +72,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
- ] ++ optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ])
- ++ optionals stdenv.isLinux [ libcap libnl ]
- ++ optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ]
- ++ 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 ])
+ ++ lib.optionals stdenv.isLinux [ libcap libnl ]
+ ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ]
+ ++ lib.optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]);
strictDeps = true;
@@ -72,22 +112,23 @@ in stdenv.mkDerivation {
install_name_tool -change "$dylib" "$out/lib/$dylib" "$f"
done
done
- '' else optionalString withQt ''
- pwd
- install -Dm644 -t $out/share/applications ../resources/freedesktop/org.wireshark.Wireshark.desktop
+ '' 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}
+ 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/
- '');
+ 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;