biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / log4j-detect / default.nix
blobaaad1fb94efbca81536eae3f8a43a3f648603e98
1 { lib
2 , fetchFromGitHub
3 , python3
4 }:
6 python3.pkgs.buildPythonApplication rec {
7   pname = "log4j-detect";
8   version = "unstable-2021-12-14";
9   format = "other";
11   src = fetchFromGitHub {
12     owner = "takito1812";
13     repo = pname;
14     rev = "2f5b7a598a6d0b4aee8111bb574ea72c6a1c76d6";
15     sha256 = "sha256-fFKW7uPBfrnze0UoPL3Mfwd4sFOuHYuDP7kv6VtdM3o=";
16   };
18   propagatedBuildInputs = with python3.pkgs; [
19     requests
20   ];
22   postPatch = ''
23     sed -i "1 i #!/usr/bin/python" ${pname}.py
24   '';
26   installPhase = ''
27     runHook preInstall
28     install -vD ${pname}.py $out/bin/${pname}
29     runHook postInstall
30   '';
32   meta = with lib; {
33     description = "Tool to detect the log4j vulnerability";
34     homepage = "https://github.com/takito1812/log4j-detect";
35     license = licenses.unfree;
36     maintainers = with maintainers; [ fab ];
37   };