2017-03-09 13:46:33 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, qmake4Hook, makeDesktopItem
|
|
|
|
, qt4, protobuf, libpcap, wireshark, gzip, diffutils, gawk
|
2016-01-03 08:06:47 +00:00
|
|
|
}:
|
|
|
|
|
2016-01-04 06:26:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-03-09 13:46:33 +00:00
|
|
|
name = "ostinato-${version}";
|
2018-02-27 17:17:16 +00:00
|
|
|
version = "0.9";
|
2017-03-09 13:46:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pstavirs";
|
|
|
|
repo = "ostinato";
|
|
|
|
rev = "v${version}";
|
2018-02-27 17:17:16 +00:00
|
|
|
sha256 = "109gxj6djdsk7rp1nxpx39kfi75xfl9p9qgffh1cpcdpbsbvq5bx";
|
2016-01-03 08:06:47 +00:00
|
|
|
};
|
|
|
|
|
2017-03-09 13:46:33 +00:00
|
|
|
ostinatoIcon = fetchurl {
|
2018-03-25 06:04:25 +01:00
|
|
|
url = "https://ostinato.org/images/site-logo.png";
|
2016-01-04 06:26:54 +00:00
|
|
|
sha256 = "f5c067823f2934e4d358d76f65a343efd69ad783a7aeabd7ab4ce3cd03490d70";
|
|
|
|
};
|
|
|
|
|
2016-01-03 08:06:47 +00:00
|
|
|
buildInputs = [ qt4 protobuf libpcap ];
|
|
|
|
|
2016-04-17 00:38:45 +01:00
|
|
|
nativeBuildInputs = [ qmake4Hook ];
|
2016-01-03 08:06:47 +00:00
|
|
|
|
2016-04-17 00:38:45 +01:00
|
|
|
patches = [ ./drone_ini.patch ];
|
2016-01-03 08:06:47 +00:00
|
|
|
|
2017-03-09 13:46:33 +00:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
type = "application";
|
|
|
|
name = "ostinato";
|
|
|
|
desktopName = "Ostinato";
|
|
|
|
genericName = "Packet/Traffic Generator and Analyzer";
|
|
|
|
comment = "Network packet and traffic generator and analyzer with a friendly GUI";
|
|
|
|
categories = "Network";
|
|
|
|
terminal = "false";
|
|
|
|
startupNotify = "true";
|
|
|
|
exec = "$out/bin/ostinato";
|
|
|
|
icon = ostinatoIcon;
|
|
|
|
extraEntries = ''
|
|
|
|
GenericName[it]=Generatore ed Analizzatore di pacchetti di rete
|
|
|
|
Comment[it]=Generatore ed Analizzatore di pacchetti di rete con interfaccia amichevole
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2016-01-03 08:06:47 +00:00
|
|
|
postInstall = ''
|
2017-03-09 13:46:33 +00:00
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
|
2016-01-03 08:06:47 +00:00
|
|
|
cat > $out/bin/ostinato.ini <<EOF
|
|
|
|
WiresharkPath=${wireshark}/bin/wireshark
|
|
|
|
TsharkPath=${wireshark}/bin/tshark
|
|
|
|
GzipPath=${gzip}/bin/gzip
|
|
|
|
DiffPath=${diffutils}/bin/diff
|
|
|
|
AwkPath=${gawk}/bin/awk
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2017-12-05 15:29:29 +00:00
|
|
|
# `cd common; qmake ostproto.pro; make pdmlreader.o`:
|
|
|
|
# pdmlprotocol.h:23:25: fatal error: protocol.pb.h: No such file or directory
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2016-01-03 08:06:47 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A packet traffic generator and analyzer";
|
2017-03-09 13:46:33 +00:00
|
|
|
homepage = http://ostinato.org;
|
|
|
|
license = licenses.gpl3;
|
2016-01-03 08:06:47 +00:00
|
|
|
maintainers = with maintainers; [ rick68 ];
|
2017-03-09 13:46:33 +00:00
|
|
|
platforms = with platforms; linux ++ darwin ++ cygwin;
|
2016-01-03 08:06:47 +00:00
|
|
|
};
|
|
|
|
}
|