mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.tree-sitter-zeek: init at 0.2.9; zeekscript: update, unbreak, modernize (#447878)
This commit is contained in:
commit
27d531766c
3 changed files with 58 additions and 16 deletions
|
|
@ -1,32 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
python3,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "zeekscript";
|
||||
version = "1.2.8";
|
||||
version = "1.3.2-unstable-2025-09-29";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-v0PJY0Ahxa4k011AwtWSIAWBXvt3Aybrd382j1SIT6M=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zeek";
|
||||
repo = "zeekscript";
|
||||
rev = "f0fa5746633a709759a94695fcc81b43feb8e2d9";
|
||||
hash = "sha256-g4Iv9xw6Owuqi+UudRzWatK09mjNDWdp0cBvH7iuV+U=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i '/name = "zeekscript"/a version = "${version}"' pyproject.toml
|
||||
'';
|
||||
build-system = with python3.pkgs; [ setuptools ];
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3.pkgs; [
|
||||
argcomplete
|
||||
tree-sitter
|
||||
tree-sitter-zeek
|
||||
];
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
];
|
||||
|
||||
checkInputs = with python3.pkgs; [ syrupy ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"zeekscript"
|
||||
];
|
||||
|
|
@ -34,13 +38,12 @@ python3.pkgs.buildPythonApplication rec {
|
|||
meta = {
|
||||
description = "Zeek script formatter and analyzer";
|
||||
homepage = "https://github.com/zeek/zeekscript";
|
||||
changelog = "https://github.com/zeek/zeekscript/blob/v${version}/CHANGES";
|
||||
changelog = "https://github.com/zeek/zeekscript/blob/${src.rev}/CHANGES";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [
|
||||
fab
|
||||
tobim
|
||||
mdaniels5757
|
||||
];
|
||||
# Incompatible with tree-sitter > 0.21.
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
37
pkgs/development/python-modules/tree-sitter-zeek/default.nix
Normal file
37
pkgs/development/python-modules/tree-sitter-zeek/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
tree-sitter,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tree-sitter-zeek";
|
||||
version = "0.2.9";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zeek";
|
||||
repo = "tree-sitter-zeek";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-0ixZAJ940mYIPD//RJVJ3PAVdY/jtYNJ5+WIlq+zfnY=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
optional-dependencies = {
|
||||
core = [ tree-sitter ];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "tree_sitter_zeek" ];
|
||||
|
||||
meta = {
|
||||
description = "Tree-sitter grammar for the Zeek scripting language";
|
||||
homepage = "https://github.com/zeek/tree-sitter-zeek";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [
|
||||
mdaniels5757
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -18819,6 +18819,8 @@ self: super: with self; {
|
|||
|
||||
tree-sitter-yaml = callPackage ../development/python-modules/tree-sitter-yaml { };
|
||||
|
||||
tree-sitter-zeek = callPackage ../development/python-modules/tree-sitter-zeek { };
|
||||
|
||||
treelib = callPackage ../development/python-modules/treelib { };
|
||||
|
||||
treelog = callPackage ../development/python-modules/treelog { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue