uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
74
pkgs/applications/networking/ostinato/default.nix
Normal file
74
pkgs/applications/networking/ostinato/default.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ lib, mkDerivation, fetchFromGitHub, fetchurl, qmake, makeDesktopItem
|
||||
, qtbase, qtscript, protobuf, libpcap, wireshark, gzip, diffutils, gawk
|
||||
, libnl
|
||||
, copyDesktopItems
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "ostinato";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pstavirs";
|
||||
repo = "ostinato";
|
||||
rev = "v${version}";
|
||||
sha256 = "0B3jOj5rA3/rD2gXS2praZImeP34zN06fOPy/IswXOg=";
|
||||
};
|
||||
|
||||
ostinatoIcon = fetchurl {
|
||||
url = "https://ostinato.org/images/site-logo.png";
|
||||
sha256 = "f5c067823f2934e4d358d76f65a343efd69ad783a7aeabd7ab4ce3cd03490d70";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase protobuf libpcap qtscript libnl ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
qmake
|
||||
];
|
||||
|
||||
patches = [ ./drone_ini.patch ];
|
||||
prePatch = ''
|
||||
sed -i 's|/usr/include/libnl3|${libnl.dev}/include/libnl3|' server/drone.pro
|
||||
'';
|
||||
|
||||
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";
|
||||
icon = ostinatoIcon;
|
||||
extraConfig = {
|
||||
"GenericName[it]" = "Generatore ed Analizzatore di pacchetti di rete";
|
||||
"Comment[it]" = "Generatore ed Analizzatore di pacchetti di rete con interfaccia amichevole";
|
||||
};
|
||||
});
|
||||
|
||||
preFixup = ''
|
||||
substituteInPlace $out/share/applications/ostinato.desktop \
|
||||
--subst-var out
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
# `cd common; qmake ostproto.pro; make pdmlreader.o`:
|
||||
# pdmlprotocol.h:23:25: fatal error: protocol.pb.h: No such file or directory
|
||||
enableParallelBuilding = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A packet traffic generator and analyzer";
|
||||
homepage = "https://ostinato.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ rick68 ];
|
||||
platforms = with platforms; linux ++ darwin ++ 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue