2016-01-03 09:06:47 +01:00
|
|
|
{ stdenv, fetchgit, fetchurl, writeText
|
2016-04-17 01:38:45 +02:00
|
|
|
, qt4, qmake4Hook, protobuf, libpcap
|
2016-01-03 09:06:47 +01:00
|
|
|
, wireshark, gzip, diffutils, gawk
|
|
|
|
}:
|
|
|
|
|
2016-01-04 07:26:54 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-03 09:06:47 +01:00
|
|
|
name = "ostinato-2015-12-24";
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/pstavirs/ostinato.git";
|
|
|
|
rev = "414d89860de0987843295d149bcabeac7c6fd9e5";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "1yif8z8ih027jdsgnxd82z9914wrqpkpi4xgxqv9lygnb2jjjrdx";
|
2016-01-03 09:06:47 +01:00
|
|
|
};
|
|
|
|
|
2016-01-04 07:26:54 +01:00
|
|
|
ostinato_png = fetchurl {
|
|
|
|
url = "http://ostinato.org/images/site-logo.png";
|
|
|
|
sha256 = "f5c067823f2934e4d358d76f65a343efd69ad783a7aeabd7ab4ce3cd03490d70";
|
|
|
|
};
|
|
|
|
|
2016-01-03 09:06:47 +01:00
|
|
|
buildInputs = [ qt4 protobuf libpcap ];
|
|
|
|
|
2016-04-17 01:38:45 +02:00
|
|
|
nativeBuildInputs = [ qmake4Hook ];
|
2016-01-03 09:06:47 +01:00
|
|
|
|
2016-04-17 01:38:45 +02:00
|
|
|
patches = [ ./drone_ini.patch ];
|
2016-01-03 09:06:47 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
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
|
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps
|
2016-01-04 07:26:54 +01:00
|
|
|
cp ${ostinato_png} $out/share/pixmaps/ostinato.png
|
2016-01-03 09:06:47 +01:00
|
|
|
|
|
|
|
# Create a desktop item.
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cat > $out/share/applications/ostinato.desktop <<EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Encoding=UTF-8
|
|
|
|
Name=Ostinato
|
|
|
|
GenericName=Packet/Traffic Generator and Analyzer
|
|
|
|
GenericName[it]=Generatore ed Analizzatore di pacchetti di rete
|
|
|
|
Comment=Network packet and traffic generator and analyzer with a friendly GUI
|
|
|
|
Comment[it]=Generatore ed Analizzatore di pacchetti di rete con interfaccia amichevole
|
|
|
|
Icon=$out/share/pixmaps/ostinato.png
|
|
|
|
Exec=$out/bin/ostinato
|
|
|
|
Terminal=false
|
|
|
|
Categories=Network;
|
|
|
|
StartupNotify=true
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A packet traffic generator and analyzer";
|
|
|
|
homepage = http://ostinato.org;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ rick68 ];
|
|
|
|
platforms = platforms.linux; # also OS X and cygwin
|
|
|
|
};
|
|
|
|
}
|