summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2022-05-25 20:32:28 +0000
committerRobert Schütz <github@dotlambda.de>2022-05-27 17:16:49 -0700
commit71be98ead1690ecd54c133b6e179bdf360db0cb1 (patch)
tree96c6cb05f81f2d8aff65e3ae4436c02a5f1c7c54
parentMerge pull request #174983 from NixOS/backport-174669-to-release-22.05 (diff)
downloadnixpkgs-71be98ead1690ecd54c133b6e179bdf360db0cb1.tar.gz
ostinato: fix desktop file
(cherry picked from commit dcd7915d177acd0ce63ef3b54fe61d23c6733e0f)
-rw-r--r--pkgs/applications/networking/ostinato/default.nix22
1 files 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 <<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;
};