From dcd7915d177acd0ce63ef3b54fe61d23c6733e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 25 May 2022 20:32:28 +0000 Subject: [PATCH] ostinato: fix desktop file --- .../networking/ostinato/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/ostinato/default.nix b/pkgs/applications/networking/ostinato/default.nix index 45307504d731..b3ff51ab7c19 100644 --- a/pkgs/applications/networking/ostinato/default.nix +++ b/pkgs/applications/networking/ostinato/default.nix @@ -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 <