wireshark: format
This commit is contained in:
parent
3c5319ad3a
commit
a75ef43adf
@ -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
|
||||
'' 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user