mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:21:57 +03:00
ostinato: add ostinato package in nixpkgs
This commit is contained in:
parent
f300b2861d
commit
89fbb184d1
59
pkgs/applications/networking/ostinato/default.nix
Normal file
59
pkgs/applications/networking/ostinato/default.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{ stdenv, fetchgit, fetchurl, writeText
|
||||||
|
, qt4, protobuf, libpcap
|
||||||
|
, wireshark, gzip, diffutils, gawk
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "ostinato-2015-12-24";
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/pstavirs/ostinato.git";
|
||||||
|
rev = "414d89860de0987843295d149bcabeac7c6fd9e5";
|
||||||
|
sha256 = "0hb78bq51r93p0yr4l1z5xlf1i666v5pa3zkdj7jmpb879kj05dx";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ qt4 protobuf libpcap ];
|
||||||
|
|
||||||
|
patches = [ ./drone_ini.patch ];
|
||||||
|
|
||||||
|
configurePhase = "qmake PREFIX=$out"
|
||||||
|
+ stdenv.lib.optionalString stdenv.isDarwin " -spec macx-g++";
|
||||||
|
|
||||||
|
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
|
||||||
|
install -D -m 644 ${./ostinato.png} $out/share/pixmaps/ostinato.png
|
||||||
|
|
||||||
|
# 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
|
||||||
|
};
|
||||||
|
}
|
14
pkgs/applications/networking/ostinato/drone_ini.patch
Normal file
14
pkgs/applications/networking/ostinato/drone_ini.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff -Nru ostinato-414d89860de0987843295d149bcabeac7c6fd9e5/server/drone_main.cpp ostinato-414d89860de0987843295d149bcabeac7c6fd9e5.new/server/drone_main.cpp
|
||||||
|
--- ostinato-414d89860de0987843295d149bcabeac7c6fd9e5/server/drone_main.cpp 2015-12-24 16:46:35.000000000 +0800
|
||||||
|
+++ ostinato-414d89860de0987843295d149bcabeac7c6fd9e5.new/server/drone_main.cpp 2015-12-30 20:59:04.319199699 +0800
|
||||||
|
@@ -62,8 +62,8 @@
|
||||||
|
/* (Portable Mode) If we have a .ini file in the same directory as the
|
||||||
|
executable, we use that instead of the platform specific location
|
||||||
|
and format for the settings */
|
||||||
|
- QString portableIni = QCoreApplication::applicationDirPath()
|
||||||
|
- + "/drone.ini";
|
||||||
|
+ QString portableIni = argc > 2 ? argv[2] :
|
||||||
|
+ QCoreApplication::applicationDirPath() + "/drone.ini";
|
||||||
|
if (QFile::exists(portableIni))
|
||||||
|
appSettings = new QSettings(portableIni, QSettings::IniFormat);
|
||||||
|
else
|
BIN
pkgs/applications/networking/ostinato/ostinato.png
Normal file
BIN
pkgs/applications/networking/ostinato/ostinato.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
@ -2596,6 +2596,8 @@ let
|
|||||||
|
|
||||||
ossec = callPackage ../tools/security/ossec {};
|
ossec = callPackage ../tools/security/ossec {};
|
||||||
|
|
||||||
|
ostinato = callPackage ../applications/networking/ostinato { };
|
||||||
|
|
||||||
ostree = callPackage ../tools/misc/ostree { };
|
ostree = callPackage ../tools/misc/ostree { };
|
||||||
|
|
||||||
otpw = callPackage ../os-specific/linux/otpw { };
|
otpw = callPackage ../os-specific/linux/otpw { };
|
||||||
|
Loading…
Reference in New Issue
Block a user