depot/third_party/nixpkgs/pkgs/development/python-modules/sqlmap/default.nix
Default email 6ae7ad3cc5 Project import generated by Copybara.
GitOrigin-RevId: a322b32e9d74fb476944ff6cfb55833dc69cfaaa
2020-11-19 01:13:47 +01:00

35 lines
957 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, stdenv
, file
}:
buildPythonPackage rec {
pname = "sqlmap";
version = "1.4.11";
src = fetchPypi {
inherit pname version;
sha256 = "5c91d13f090c8e891201c7b924cc2b2feccf12042b42075a5623b4986b9c9ee7";
};
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;
meta = with lib; {
homepage = "http://sqlmap.org";
license = licenses.gpl2;
description = "Automatic SQL injection and database takeover tool";
maintainers = with maintainers; [ bennofs ];
};
}