diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-02-18 20:24:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 20:24:15 +0100 |
commit | 8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce (patch) | |
tree | 662c68e7c82b3454a6f4d88725c19f6c53f0fa4d /pkgs/tools | |
parent | d17381e90505aea6b834b7b30baeefb6b1ad82ec (diff) | |
parent | 30e6a35c8153cbcbc8968d5adb702ab1ee2affac (diff) | |
download | nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar.gz nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar.bz2 nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar.lz nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar.xz nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.tar.zst nixpkgs-8b4f9b531c0e8a6321fcd7e3743c97cc10f530ce.zip |
Merge pull request #113381 from fabaff/nmap-unfree
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/nmap-unfree/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/tools/security/nmap-unfree/default.nix b/pkgs/tools/security/nmap-unfree/default.nix new file mode 100644 index 00000000000..1e6ed42bae4 --- /dev/null +++ b/pkgs/tools/security/nmap-unfree/default.nix @@ -0,0 +1,65 @@ +{ 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 ]; + }; +} |