nixpkgs/pkgs/development/python-modules/sqlmap/default.nix

38 lines
985 B
Nix
Raw Normal View History

2017-08-25 10:22:30 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, file
2021-03-21 21:46:11 +00:00
, stdenv
2017-08-25 10:22:30 +01:00
}:
buildPythonPackage rec {
pname = "sqlmap";
2021-03-21 21:46:11 +00:00
version = "1.5.3";
2017-08-25 10:22:30 +01:00
src = fetchPypi {
inherit pname version;
2021-03-21 21:46:11 +00:00
sha256 = "sha256-b2Q5Zelz0AWbNQotOLWdwN5+20Q5jATH3nzLEJQRwno=";
2017-08-25 10:22:30 +01: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;
pythonImportsCheck = [ "sqlmap" ];
2017-08-25 10:22:30 +01:00
meta = with lib; {
description = "Automatic SQL injection and database takeover tool";
2021-03-21 21:46:11 +00:00
homepage = "http://sqlmap.org";
license = licenses.gpl2Plus;
2017-08-25 10:22:30 +01:00
maintainers = with maintainers; [ bennofs ];
};
}