Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 file, 7 setuptools, 8}: 9 10buildPythonPackage rec { 11 pname = "sqlmap"; 12 version = "1.9.10"; 13 pyproject = true; 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-S5A/zjf5PpauzIU3BGiijgGEq7OrFoj13xkYAJgdnOA="; 18 }; 19 20 postPatch = '' 21 substituteInPlace sqlmap/thirdparty/magic/magic.py --replace "ctypes.util.find_library('magic')" \ 22 "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'" 23 24 # the check for the last update date does not work in Nix, 25 # since the timestamp of the all files in the nix store is reset to the unix epoch 26 echo 'LAST_UPDATE_NAGGING_DAYS = float("inf")' >> sqlmap/lib/core/settings.py 27 ''; 28 29 build-system = [ setuptools ]; 30 31 # No tests in archive 32 doCheck = false; 33 34 pythonImportsCheck = [ "sqlmap" ]; 35 36 meta = with lib; { 37 description = "Automatic SQL injection and database takeover tool"; 38 homepage = "https://sqlmap.org"; 39 changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}"; 40 license = licenses.gpl2Plus; 41 maintainers = with maintainers; [ bennofs ]; 42 mainProgram = "sqlmap"; 43 }; 44}