nixos/filesystems: don't silently ignore label when device is set (#361418)
[NixPkgs.git] / pkgs / by-name / lo / log4shell-detector / package.nix
blobc29a32bea39694f8072d468dfa699eec1ce975c0
1 { lib
2 , fetchFromGitHub
3 , python3
4 }:
6 python3.pkgs.buildPythonApplication rec {
7   pname = "log4shell-detector";
8   version = "unstable-2021-12-16";
9   format = "setuptools";
11   src = fetchFromGitHub {
12     owner = "Neo23x0";
13     repo = pname;
14     rev = "622b88e7ea36819da23ce6ac090785cd6cca77f9";
15     sha256 = "sha256-N81x9hq473LfM+bQIQLWizCAsVc/pzyB84PV7/N5jk4=";
16   };
18   propagatedBuildInputs = with python3.pkgs; [
19     zstandard
20   ];
22   nativeCheckInputs = with python3.pkgs; [
23     pytestCheckHook
24   ];
26   installPhase = ''
27     runHook preInstall
28     install -vD ${pname}.py $out/bin/${pname}
29     install -vd $out/${python3.sitePackages}/
30     cp -R Log4ShellDetector $out/${python3.sitePackages}
31     runHook postInstall
32   '';
34   meta = with lib; {
35     description = "Detector for Log4Shell exploitation attempts";
36     homepage = "https://github.com/Neo23x0/log4shell-detector";
37     license = licenses.mit;
38     maintainers = with maintainers; [ fab ];
39     mainProgram = "log4shell-detector";
40   };