2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchPypi
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "zeekscript";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.2.8";
|
|
|
|
pyproject = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-v0PJY0Ahxa4k011AwtWSIAWBXvt3Aybrd382j1SIT6M=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/name = "zeekscript"/a version = "${version}"' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
setuptools
|
2023-08-04 22:07:22 +00:00
|
|
|
wheel
|
2023-04-12 12:48:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|