Merge pull request #223432 from fabaff/zeekscript

zeekscript: init at 1.2.1
This commit is contained in:
Fabian Affolter 2023-04-10 00:43:12 +02:00 committed by GitHub
commit d02bb4cf07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:
buildPythonPackage rec {
pname = "tree-sitter";
version = "0.20.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "tree_sitter";
inherit version;
hash = "sha256-6T8ILFRdZkm8+11oHtJV6wBKbOIpiJcaEo9AaS/uxg0=";
};
nativeBuildInputs = [
setuptools
wheel
];
# PyPI tarball doesn't contains tests and source has additional requirements
doCheck = false;
pythonImportsCheck = [
"tree_sitter"
];
meta = with lib; {
description = "Python bindings to the Tree-sitter parsing library";
homepage = "https://github.com/tree-sitter/py-tree-sitter";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,35 @@
{ lib
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "zeekscript";
version = "1.2.1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-LogI9sJHvLN5WHJGdW47D09XZInKln/I2hNmG62d1JU=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
];
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 ];
};
}

View file

@ -7123,6 +7123,8 @@ with pkgs;
zeek = callPackage ../applications/networking/ids/zeek { };
zeekscript = callPackage ../tools/security/zeekscript { };
zoekt = callPackage ../tools/text/zoekt { };
zonemaster-cli = perlPackages.ZonemasterCLI;

View file

@ -11965,6 +11965,8 @@ self: super: with self; {
trectools = callPackage ../development/python-modules/trectools { };
tree-sitter = callPackage ../development/python-modules/tree-sitter { };
treelog = callPackage ../development/python-modules/treelog { };
treeo = callPackage ../development/python-modules/treeo { };