Merge pull request #170431 from armeenm/remove-nmap-graphical

This commit is contained in:
Artturi 2022-05-05 04:18:34 +03:00 committed by GitHub
commit 867b4b5eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 23 deletions

View File

@ -1,9 +1,7 @@
{ lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3
, pcre, libssh2
, graphicalSupport ? false
, libX11 ? null
, gtk2 ? null
, python2 ? null
, makeWrapper ? null
, withLua ? true
}:
@ -11,7 +9,7 @@
with lib;
stdenv.mkDerivation rec {
pname = "nmap${optionalString graphicalSupport "-graphical"}";
pname = "nmap";
version = "7.92";
src = fetchurl {
@ -41,7 +39,9 @@ stdenv.mkDerivation rec {
configureFlags = [
(if withLua then "--with-liblua=${lua5_3}" else "--without-liblua")
"--with-liblinear=included"
] ++ optionals (!graphicalSupport) [ "--without-ndiff" "--without-zenmap" ];
"--without-ndiff"
"--without-zenmap"
];
makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"AR=${stdenv.cc.bintools.targetPrefix}ar"
@ -49,20 +49,8 @@ stdenv.mkDerivation rec {
"CC=${stdenv.cc.targetPrefix}gcc"
];
pythonPath = with python2.pkgs; optionals graphicalSupport [
pygtk pysqlite pygobject2 pycairo
];
nativeBuildInputs = [ pkg-config ] ++ optionals graphicalSupport [ python2.pkgs.wrapPython ];
buildInputs = [ pcre libssh2 libpcap openssl ] ++ optionals graphicalSupport (with python2.pkgs; [
python2 libX11 gtk2
]);
postInstall = optionalString graphicalSupport ''
buildPythonPath "$out $pythonPath"
patchPythonScript $out/bin/ndiff
patchPythonScript $out/bin/zenmap
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pcre libssh2 libpcap openssl ];
enableParallelBuilding = true;

View File

@ -871,7 +871,8 @@ mapAliases ({
nix_2_6 = nixVersions.nix_2_6;
nixopsUnstable = nixops_unstable; # Added 2022-03-03
nmap-unfree = nmap; # Added 2021-04-06
nmap_graphical = throw "'nmap_graphical' has been renamed to/replaced by 'nmap-graphical'"; # Converted to throw 2022-02-22
nmap-graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Added 2022-04-26
nmap_graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Modified 2022-04-26
nologin = throw "'nologin' has been renamed to/replaced by 'shadow'"; # Converted to throw 2022-02-22
nordic-polar = throw "nordic-polar was removed on 2021-05-27, now integrated in nordic"; # Added 2021-05-27
noto-fonts-cjk = noto-fonts-cjk-sans; # Added 2021-12-16

View File

@ -8733,10 +8733,6 @@ with pkgs;
nmap = callPackage ../tools/security/nmap { };
nmap-graphical = nmap.override {
graphicalSupport = true;
};
nmap-formatter = callPackage ../tools/security/nmap-formatter { };
nmapsi4 = libsForQt5.callPackage ../tools/security/nmap/qt.nix { };