ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, file
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlmap";
|
|
version = "1.8.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-X3xz2ucuxr48q9gS9K19Zd7gYkRCpU+XLWMSrwiQMIo=";
|
|
};
|
|
|
|
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
|
|
'';
|
|
|
|
# No tests in archive
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"sqlmap"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Automatic SQL injection and database takeover tool";
|
|
mainProgram = "sqlmap";
|
|
homepage = "https://sqlmap.org";
|
|
changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ bennofs ];
|
|
};
|
|
}
|