@@ -1,17 +1,28 @@
11{ lib
22, buildPythonPackage
33, fetchPypi
4+, stdenv
5+, file
46}:
57
68buildPythonPackage rec {
79 pname = "sqlmap";
8− version = "1.4";
10+ version = "1.4.2";
911
1012 src = fetchPypi {
1113 inherit pname version;
12− sha256 = "0s6lgp66bn0l4a5mwxiv9h04sa7braqvjskns315lb93lyb4y092";
14+ sha256 = "12i5s3qs0lxfs06p5b354scbapldf4isfr00cg1dq47n4gnqwa99";
1315 };
1416
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+
1526 # No tests in archive
1627 doCheck = false;
1728