mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-08 14:40:07 +03:00
ostinato: fix desktop file
This commit is contained in:
parent
37b04e54e3
commit
dcd7915d17
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user