mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-14 20:10:25 +08:00
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>
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
file,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlmap";
|
|
version = "1.9.12";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-Cz83zLjGqvDjwVFmMi4AHB8JYbxgHkQnKHXVwyxEp1c=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace sqlmap/thirdparty/magic/magic.py --replace "ctypes.util.find_library('magic')" \
|
|
"'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
|
|
# the check for the last update date does not work in Nix,
|
|
# since the timestamp of the all files in the nix store is reset to the unix epoch
|
|
echo 'LAST_UPDATE_NAGGING_DAYS = float("inf")' >> sqlmap/lib/core/settings.py
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
# No tests in archive
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "sqlmap" ];
|
|
|
|
meta = {
|
|
description = "Automatic SQL injection and database takeover tool";
|
|
homepage = "https://sqlmap.org";
|
|
changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [ bennofs ];
|
|
mainProgram = "sqlmap";
|
|
};
|
|
}
|