mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, file
|
|
, stdenv
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqlmap";
|
|
version = "1.6.11";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-/zucBRLf5qnRURS0YS3Zv4jxRZYOIGtzPBepQ7a2nvs=";
|
|
};
|
|
|
|
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 = "https://sqlmap.org";
|
|
changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ bennofs ];
|
|
};
|
|
}
|