2020-01-15 10:57:34 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig, wrapQtAppsHook
|
2018-02-05 11:16:08 +00:00
|
|
|
, dnsutils, nmap
|
2019-04-10 13:21:53 +00:00
|
|
|
, qtbase, qtscript, qtwebengine }:
|
2018-02-05 11:16:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nmapsi4";
|
2019-04-10 13:21:53 +00:00
|
|
|
version = "0.4.80-20180430";
|
2018-02-05 11:16:08 +00:00
|
|
|
|
2019-04-10 13:21:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nmapsi4";
|
|
|
|
repo = "nmapsi4";
|
|
|
|
rev = "d7f18e4c1e38dcf9c29cb4496fe14f9ff172861a";
|
|
|
|
sha256 = "10wqyrjzmad1g7lqa65rymbkna028xbp4xcpj442skw8gyrs3994";
|
2018-02-05 11:16:08 +00:00
|
|
|
};
|
|
|
|
|
2020-01-15 10:57:34 +00:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
|
2018-02-05 11:16:08 +00:00
|
|
|
|
2019-04-10 13:21:53 +00:00
|
|
|
buildInputs = [ qtbase qtscript qtwebengine ];
|
2018-02-05 11:16:08 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-04-10 13:21:53 +00:00
|
|
|
substituteInPlace src/platform/digmanager.cpp \
|
|
|
|
--replace '"dig"' '"${dnsutils}/bin/dig"'
|
|
|
|
substituteInPlace src/platform/discover.cpp \
|
|
|
|
--replace '"nping"' '"${nmap}/bin/nping"'
|
2018-02-05 11:16:08 +00:00
|
|
|
for f in \
|
|
|
|
src/platform/monitor/monitor.cpp \
|
|
|
|
src/platform/nsemanager.cpp ; do
|
|
|
|
|
|
|
|
substituteInPlace $f \
|
2019-04-10 13:21:53 +00:00
|
|
|
--replace '"nmap"' '"${nmap}/bin/nmap"'
|
2018-02-05 11:16:08 +00:00
|
|
|
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 stdenv.lib; {
|
|
|
|
description = "Qt frontend for nmap";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2019-04-10 13:21:53 +00:00
|
|
|
inherit (src.meta) homepage;
|
2018-02-05 11:16:08 +00:00
|
|
|
};
|
|
|
|
}
|