1{ lib
2, buildPythonPackage
3, fetchPypi
4, file
5, stdenv
6}:
7
8buildPythonPackage rec {
9 pname = "sqlmap";
10 version = "1.5.11";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "196021f0eff1699853675ee80e13bc856c9f1a088d93a0ac023651d2a3f62cf5";
15 };
16
17 postPatch = ''
18 substituteInPlace sqlmap/thirdparty/magic/magic.py --replace "ctypes.util.find_library('magic')" \
19 "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
20
21 # the check for the last update date does not work in Nix,
22 # since the timestamp of the all files in the nix store is reset to the unix epoch
23 echo 'LAST_UPDATE_NAGGING_DAYS = float("inf")' >> sqlmap/lib/core/settings.py
24 '';
25
26 # No tests in archive
27 doCheck = false;
28
29 pythonImportsCheck = [ "sqlmap" ];
30
31 meta = with lib; {
32 description = "Automatic SQL injection and database takeover tool";
33 homepage = "http://sqlmap.org";
34 license = licenses.gpl2Plus;
35 maintainers = with maintainers; [ bennofs ];
36 };
37}