git.iko.soy/typeable/nixpkgs
on master help sign in
nmap: remove graphical support
commit67b887147fc935ab8587d9b712541dcbf902b48a authorArmeen Mahdian <mahdianarmeen@gmail.com> dateTue 26 Apr 2022, 09:35 (5 years ago) parent6e4f70e
3 files changed+8−23
pkgs/tools/security/nmap/default.nix+6−18 pkgs/top-level/aliases.nix+2−1 pkgs/top-level/all-packages.nix−4
pkgs/tools/security/nmap/default.nix+6−18
@@ -1,9 +1,7 @@
11{ lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3
22, pcre, libssh2
3−, graphicalSupport ? false
43, libX11 ? null
54, gtk2 ? null
6−, python2 ? null
75, makeWrapper ? null
86, withLua ? true
97}:
@@ -11,7 +9,7 @@
119with lib;
1210
1311stdenv.mkDerivation rec {
14− pname = "nmap${optionalString graphicalSupport "-graphical"}";
12+ pname = "nmap";
1513 version = "7.92";
1614
1715 src = fetchurl {
@@ -41,7 +39,9 @@ stdenv.mkDerivation rec {
4139 configureFlags = [
4240 (if withLua then "--with-liblua=${lua5_3}" else "--without-liblua")
4341 "--with-liblinear=included"
44− ] ++ optionals (!graphicalSupport) [ "--without-ndiff" "--without-zenmap" ];
42+ "--without-ndiff"
43+ "--without-zenmap"
44+ ];
4545
4646 makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
4747 "AR=${stdenv.cc.bintools.targetPrefix}ar"
@@ -49,20 +49,8 @@ stdenv.mkDerivation rec {
4949 "CC=${stdenv.cc.targetPrefix}gcc"
5050 ];
5151
52− pythonPath = with python2.pkgs; optionals graphicalSupport [
53− pygtk pysqlite pygobject2 pycairo
54− ];
55−
56− nativeBuildInputs = [ pkg-config ] ++ optionals graphicalSupport [ python2.pkgs.wrapPython ];
57− buildInputs = [ pcre libssh2 libpcap openssl ] ++ optionals graphicalSupport (with python2.pkgs; [
58− python2 libX11 gtk2
59− ]);
60−
61− postInstall = optionalString graphicalSupport ''
62− buildPythonPath "$out $pythonPath"
63− patchPythonScript $out/bin/ndiff
64− patchPythonScript $out/bin/zenmap
65− '';
52+ nativeBuildInputs = [ pkg-config ];
53+ buildInputs = [ pcre libssh2 libpcap openssl ];
6654
6755 enableParallelBuilding = true;
6856
pkgs/top-level/aliases.nix+2−1
@@ -867,7 +867,8 @@ mapAliases ({
867867 nix_2_6 = nixVersions.nix_2_6;
868868 nixopsUnstable = nixops_unstable; # Added 2022-03-03
869869 nmap-unfree = nmap; # Added 2021-04-06
870− nmap_graphical = throw "'nmap_graphical' has been renamed to/replaced by 'nmap-graphical'"; # Converted to throw 2022-02-22
870+ nmap-graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Added 2022-04-26
871+ nmap_graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Modified 2022-04-26
871872 nologin = throw "'nologin' has been renamed to/replaced by 'shadow'"; # Converted to throw 2022-02-22
872873 nordic-polar = throw "nordic-polar was removed on 2021-05-27, now integrated in nordic"; # Added 2021-05-27
873874 noto-fonts-cjk = noto-fonts-cjk-sans; # Added 2021-12-16
pkgs/top-level/all-packages.nix−4
@@ -8675,10 +8675,6 @@ with pkgs;
86758675
86768676 nmap = callPackage ../tools/security/nmap { };
86778677
8678− nmap-graphical = nmap.override {
8679− graphicalSupport = true;
8680− };
8681−
86828678 nmap-formatter = callPackage ../tools/security/nmap-formatter { };
86838679
86848680 nmapsi4 = libsForQt5.callPackage ../tools/security/nmap/qt.nix { };