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
66
pkgs/tools/security/nmap/default.nix
Normal file
66
pkgs/tools/security/nmap/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3
|
||||
, pcre, libssh2
|
||||
, libX11 ? null
|
||||
, gtk2 ? null
|
||||
, makeWrapper ? null
|
||||
, withLua ? true
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nmap";
|
||||
version = "7.92";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://nmap.org/dist/nmap-${version}.tar.bz2";
|
||||
sha256 = "sha256-pUefL4prCyUWdn0vcYnDhsHchY2ZcWfX7Fz8eYx1caE=";
|
||||
};
|
||||
|
||||
patches = [ ./zenmap.patch ]
|
||||
++ optionals stdenv.cc.isClang [(
|
||||
# Fixes a compile error due an ambiguous reference to bind(2) in
|
||||
# nping/EchoServer.cc, which is otherwise resolved to std::bind.
|
||||
# https://github.com/nmap/nmap/pull/1363
|
||||
fetchpatch {
|
||||
url = "https://github.com/nmap/nmap/commit/5bbe66f1bd8cbd3718f5805139e2e8139e6849bb.diff";
|
||||
includes = [ "nping/EchoServer.cc" ];
|
||||
sha256 = "0xcph9mycy57yryjg253frxyz87c4135rrbndlqw1400c8jxq70c";
|
||||
}
|
||||
)];
|
||||
|
||||
prePatch = optionalString stdenv.isDarwin ''
|
||||
substituteInPlace libz/configure \
|
||||
--replace /usr/bin/libtool ar \
|
||||
--replace 'AR="libtool"' 'AR="ar"' \
|
||||
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
(if withLua then "--with-liblua=${lua5_3}" else "--without-liblua")
|
||||
"--with-liblinear=included"
|
||||
"--without-ndiff"
|
||||
"--without-zenmap"
|
||||
];
|
||||
|
||||
makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"AR=${stdenv.cc.bintools.targetPrefix}ar"
|
||||
"RANLIB=${stdenv.cc.bintools.targetPrefix}ranlib"
|
||||
"CC=${stdenv.cc.targetPrefix}gcc"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pcre libssh2 libpcap openssl ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # fails 3 tests, probably needs the net
|
||||
|
||||
meta = {
|
||||
description = "A free and open source utility for network discovery and security auditing";
|
||||
homepage = "http://www.nmap.org";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ thoughtpolice fpletz ];
|
||||
};
|
||||
}
|
||||
60
pkgs/tools/security/nmap/qt.nix
Normal file
60
pkgs/tools/security/nmap/qt.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, wrapQtAppsHook
|
||||
, dnsutils
|
||||
, nmap
|
||||
, qtbase
|
||||
, qtscript
|
||||
, qtwebengine
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nmapsi4";
|
||||
version = "0.5-alpha2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nmapsi4";
|
||||
repo = "nmapsi4";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-q3XfwJ4TGK4E58haN0Q0xRH4GDpKD8VZzyxHe/VwBqY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtbase qtscript qtwebengine ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/platform/digmanager.cpp \
|
||||
--replace '"dig"' '"${dnsutils}/bin/dig"'
|
||||
substituteInPlace src/platform/discover.cpp \
|
||||
--replace '"nping"' '"${nmap}/bin/nping"'
|
||||
for f in \
|
||||
src/platform/monitor/monitor.cpp \
|
||||
src/platform/nsemanager.cpp ; do
|
||||
|
||||
substituteInPlace $f \
|
||||
--replace '"nmap"' '"${nmap}/bin/nmap"'
|
||||
done
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mv $out/share/applications/kde4/*.desktop $out/share/applications
|
||||
rmdir $out/share/applications/kde4
|
||||
|
||||
for f in $out/share/applications/* ; do
|
||||
substituteInPlace $f \
|
||||
--replace Qt4 Qt5 \
|
||||
--replace Exec=nmapsi4 Exec=$out/bin/nmapsi4 \
|
||||
--replace "Exec=kdesu nmapsi4" "Exec=kdesu $out/bin/nmapsi4"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qt frontend for nmap";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
inherit (src.meta) homepage;
|
||||
};
|
||||
}
|
||||
15
pkgs/tools/security/nmap/zenmap.patch
Normal file
15
pkgs/tools/security/nmap/zenmap.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -ruN nmap-5.50.orig/zenmap/zenmapCore/Paths.py nmap-5.50/zenmap/zenmapCore/Paths.py
|
||||
--- nmap-5.50.orig/zenmap/zenmapCore/Paths.py 2013-06-06 05:52:10.723087428 +0000
|
||||
+++ nmap-5.50/zenmap/zenmapCore/Paths.py 2013-06-06 07:07:25.481261761 +0000
|
||||
@@ -115,7 +115,10 @@
|
||||
else:
|
||||
# Normal script execution. Look in the current directory to allow
|
||||
# running from the distribution.
|
||||
- return os.path.abspath(os.path.dirname(fs_dec(sys.argv[0])))
|
||||
+ #
|
||||
+ # Grrwlf: No,no,dear. That's not a script, thats Nixos wrapper. Go add
|
||||
+ # those '..' to substract /bin part.
|
||||
+ return os.path.abspath(os.path.join(os.path.dirname(fs_dec(sys.argv[0])), ".."))
|
||||
|
||||
prefix = get_prefix()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue