3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/sqlmap/default.nix
2021-11-01 18:13:21 -07:00

38 lines
999 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, file
, stdenv
}:
buildPythonPackage rec {
pname = "sqlmap";
version = "1.5.11";
src = fetchPypi {
inherit pname version;
sha256 = "196021f0eff1699853675ee80e13bc856c9f1a088d93a0ac023651d2a3f62cf5";
};
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";
homepage = "http://sqlmap.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ bennofs ];
};
}