2017-08-25 10:22:30 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-02-06 14:55:01 +00:00
|
|
|
, stdenv
|
|
|
|
, file
|
2017-08-25 10:22:30 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlmap";
|
2021-01-03 14:13:05 +00:00
|
|
|
version = "1.4.12";
|
2017-08-25 10:22:30 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-03 14:13:05 +00:00
|
|
|
sha256 = "166adazdrv92azx4p0qng0cm3va6i301vfsr4yyf0azj3sdg0waj";
|
2017-08-25 10:22:30 +01:00
|
|
|
};
|
|
|
|
|
2020-02-06 14:55:01 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2017-08-25 10:22:30 +01:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-03 14:13:05 +00:00
|
|
|
pythonImportsCheck = [ "sqlmap" ];
|
|
|
|
|
2017-08-25 10:22:30 +01:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://sqlmap.org";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
description = "Automatic SQL injection and database takeover tool";
|
|
|
|
maintainers = with maintainers; [ bennofs ];
|
|
|
|
};
|
|
|
|
}
|