about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/zeekscript/default.nix
blob: c1ab0cb4a190c2e463f7f636245a5196297228ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, python3
, fetchPypi
}:

python3.pkgs.buildPythonApplication rec {
  pname = "zeekscript";
  version = "1.2.1";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-LogI9sJHvLN5WHJGdW47D09XZInKln/I2hNmG62d1JU=";
  };

  postPatch = ''
    sed -i '/name = "zeekscript"/a version = "${version}"' pyproject.toml
  '';

  nativeBuildInputs = with python3.pkgs; [
    setuptools
    wheel
  ];

  propagatedBuildInputs = with python3.pkgs; [
    tree-sitter
  ];

  pythonImportsCheck = [
    "zeekscript"
  ];

  meta = with lib; {
    description = "A Zeek script formatter and analyzer";
    homepage = "https://github.com/zeek/zeekscript";
    changelog = "https://github.com/zeek/zeekscript/blob/v${version}/CHANGES";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab tobim ];
  };
}