Files
nixpkgs/pkgs/development/python-modules/python-nmap/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

43 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
nmap,
}:
buildPythonPackage rec {
pname = "python-nmap";
version = "0.7.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-91r2uR3Y47DDH4adsyFj9iraaGlF5bfCX4S8D3+tO2Q=";
};
propagatedBuildInputs = [ nmap ];
postPatch = ''
substituteInPlace setup.cfg \
--replace "universal=3" "universal=1"
'';
# Tests requires sudo and performs scans
doCheck = false;
pythonImportsCheck = [ "nmap" ];
meta = {
description = "Python library which helps in using nmap";
longDescription = ''
python-nmap is a Python library which helps in using nmap port scanner. It
allows to easily manipulate nmap scan results and will be a perfect tool
for systems administrators who want to automatize scanning task and reports.
It also supports nmap script outputs.
'';
homepage = "https://xael.org/pages/python-nmap-en.html";
license = with lib.licenses; [ gpl3Plus ];
maintainers = with lib.maintainers; [ fab ];
};
}