depot/third_party/nixpkgs/pkgs/development/python-modules/sqlmap/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

47 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
file,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "sqlmap";
version = "1.8.9";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-0ARkSUzmrqyRSPl3EXU7NzcnaWf+Zbt4zQZ626gvfEs=";
};
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 = with lib; {
description = "Automatic SQL injection and database takeover tool";
homepage = "https://sqlmap.org";
changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ bennofs ];
mainProgram = "sqlmap";
};
}