Unverified Commit e5209d3d authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #118158 from nextl00p/nmap

nmap: 7.80 -> 7.91
parents b2ae6683 1d304d07
Loading
Loading
Loading
Loading
+0 −65
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, libpcap
, pkg-config
, openssl
, lua5_3
, pcre
, liblinear
, libssh2
, zlib
, withLua ? true
}:

stdenv.mkDerivation rec {
  pname = "nmap-unfree";
  version = "7.91";

  src = fetchurl {
    url = "https://nmap.org/dist/nmap-${version}.tar.bz2";
    sha256 = "001kb5xadqswyw966k2lqi6jr6zz605jpp9w4kmm272if184pk0q";
  };

  prePatch = lib.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")
  ];

  makeFlags = lib.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
    liblinear
    libssh2
    libpcap
    openssl
    zlib
  ];

  enableParallelBuilding = true;

  # Tests require network access
  doCheck = false;

  meta = with lib; {
    description = "Open source utility for network discovery and security auditing";
    homepage = "http://www.nmap.org";
    # Nmap Public Source License Version 0.93
    # https://github.com/nmap/nmap/blob/master/LICENSE
    license = licenses.unfree;
    maintainers = with maintainers; [ fab SuperSandro2000 ];
  };
}
+2 −2
Original line number Diff line number Diff line
@@ -12,11 +12,11 @@ with lib;

stdenv.mkDerivation rec {
  name = "nmap${optionalString graphicalSupport "-graphical"}-${version}";
  version = "7.80";
  version = "7.91";

  src = fetchurl {
    url = "https://nmap.org/dist/nmap-${version}.tar.bz2";
    sha256 = "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw";
    sha256 = "001kb5xadqswyw966k2lqi6jr6zz605jpp9w4kmm272if184pk0q";
  };

  patches = [ ./zenmap.patch ]
+1 −0
Original line number Diff line number Diff line
@@ -526,6 +526,7 @@ mapAliases ({
  nix-review = nixpkgs-review; # added 2019-12-22
  nixFlakes = nixUnstable; # added 2021-05-21
  nmap_graphical = nmap-graphical;  # added 2017-01-19
  nmap-unfree = nmap; # added 2021-04-06
  nologin = shadow; # added 2018-04-25
  nordic-polar = throw "nordic-polar was removed on 2021-05-27, now integrated in nordic"; # added 2021-05-27
  nxproxy = nx-libs; # added 2019-02-15
+0 −2
Original line number Diff line number Diff line
@@ -7495,8 +7495,6 @@ in
    graphicalSupport = true;
  };
  nmap-unfree = callPackage ../tools/security/nmap-unfree { };
  nmapsi4 = libsForQt514.callPackage ../tools/security/nmap/qt.nix { };
  nnn = callPackage ../applications/misc/nnn { };