summary refs log tree commit diff
path: root/pkgs/tools/security/nmap/default.nix
diff options
context:
space:
mode:
authorShawn8901 <shawn8901@googlemail.com>2023-01-24 17:35:54 +0100
committerShawn8901 <shawn8901@googlemail.com>2023-01-24 17:41:44 +0100
commit133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a (patch)
tree9dead942010487480968a8fbada2ef7c487a0033 /pkgs/tools/security/nmap/default.nix
parentc0aeb3305473e3a0df97785f562ea8707630e999 (diff)
downloadnixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.gz
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.bz2
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.lz
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.xz
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.zst
nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.zip
treewide: remove global with lib; in pkgs/tools
Diffstat (limited to 'pkgs/tools/security/nmap/default.nix')
-rw-r--r--pkgs/tools/security/nmap/default.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkgs/tools/security/nmap/default.nix b/pkgs/tools/security/nmap/default.nix
index d6276b3cc40..fbabe92b199 100644
--- a/pkgs/tools/security/nmap/default.nix
+++ b/pkgs/tools/security/nmap/default.nix
@@ -6,8 +6,6 @@
 , withLua ? true
 }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "nmap";
   version = "7.93";
@@ -18,7 +16,7 @@ stdenv.mkDerivation rec {
   };
 
   patches = [ ./zenmap.patch ]
-    ++ optionals stdenv.cc.isClang [(
+    ++ lib.optionals stdenv.cc.isClang [(
       # Fixes a compile error due an ambiguous reference to bind(2) in
       # nping/EchoServer.cc, which is otherwise resolved to std::bind.
       # https://github.com/nmap/nmap/pull/1363
@@ -29,7 +27,7 @@ stdenv.mkDerivation rec {
       }
     )];
 
-  prePatch = optionalString stdenv.isDarwin ''
+  prePatch = lib.optionalString stdenv.isDarwin ''
     substituteInPlace libz/configure \
         --replace /usr/bin/libtool ar \
         --replace 'AR="libtool"' 'AR="ar"' \
@@ -43,7 +41,7 @@ stdenv.mkDerivation rec {
     "--without-zenmap"
   ];
 
-  makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+  makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
     "AR=${stdenv.cc.bintools.targetPrefix}ar"
     "RANLIB=${stdenv.cc.bintools.targetPrefix}ranlib"
     "CC=${stdenv.cc.targetPrefix}gcc"
@@ -56,7 +54,7 @@ stdenv.mkDerivation rec {
 
   doCheck = false; # fails 3 tests, probably needs the net
 
-  meta = {
+  meta = with lib; {
     description = "A free and open source utility for network discovery and security auditing";
     homepage    = "http://www.nmap.org";
     license     = licenses.gpl2;