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

main
Artturi 2 years ago committed by GitHub
commit 867b4b5eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      pkgs/tools/security/nmap/default.nix
  2. 3
      pkgs/top-level/aliases.nix
  3. 4
      pkgs/top-level/all-packages.nix

@ -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;

@ -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

@ -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 { };

Loading…
Cancel
Save