Merge pull request #174610 from dotlambda/ostinato-desktop-file

ostinato: fix desktop file
This commit is contained in:
Sandro 2022-05-28 01:18:12 +02:00 committed by GitHub
commit 0e6478f420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
{ lib, mkDerivation, fetchFromGitHub, fetchurl, qmake, makeDesktopItem
, qtbase, qtscript, protobuf, libpcap, wireshark, gzip, diffutils, gawk
, libnl
, copyDesktopItems
}:
mkDerivation rec {
@ -21,31 +22,34 @@ mkDerivation rec {
buildInputs = [ qtbase protobuf libpcap qtscript libnl ];
nativeBuildInputs = [ qmake ];
nativeBuildInputs = [
copyDesktopItems
qmake
];
patches = [ ./drone_ini.patch ];
prePatch = ''
sed -i 's|/usr/include/libnl3|${libnl.dev}/include/libnl3|' server/drone.pro
'';
desktopItem = makeDesktopItem {
desktopItems = lib.singleton (makeDesktopItem {
name = "ostinato";
desktopName = "Ostinato";
genericName = "Packet/Traffic Generator and Analyzer";
comment = "Network packet and traffic generator and analyzer with a friendly GUI";
categories = [ "Network" ];
startupNotify = true;
exec = "$out/bin/ostinato";
exec = "@out@/bin/ostinato";
icon = ostinatoIcon;
extraConfig = {
"GenericName[it]" = "Generatore ed Analizzatore di pacchetti di rete";
"Comment[it]" = "Generatore ed Analizzatore di pacchetti di rete con interfaccia amichevole";
};
};
});
postInstall = ''
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
preFixup = ''
substituteInPlace $out/share/applications/ostinato.desktop \
--subst-var out
cat > $out/bin/ostinato.ini <<EOF
WiresharkPath=${wireshark}/bin/wireshark
@ -62,8 +66,8 @@ mkDerivation rec {
meta = with lib; {
description = "A packet traffic generator and analyzer";
homepage = "https://ostinato.org";
license = licenses.gpl3;
homepage = "https://ostinato.org/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ rick68 ];
platforms = with platforms; linux ++ darwin ++ cygwin;
};