2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
git,
|
|
|
|
python3,
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "troubadix";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "24.7.4";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greenbone";
|
|
|
|
repo = "troubadix";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-WYl2i6ZpFvzRCb47ynnzwn9cS2WE7SjD3/JsMU3/xBM=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "validators" ];
|
|
|
|
|
|
|
|
build-system = with python3.pkgs; [ poetry-core ];
|
|
|
|
|
|
|
|
|
|
|
|
dependencies = with python3.pkgs; [
|
|
|
|
chardet
|
|
|
|
charset-normalizer
|
|
|
|
pkgs.codespell
|
|
|
|
gitpython
|
|
|
|
pontos
|
|
|
|
python-magic
|
|
|
|
validators
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
git
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "troubadix" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError
|
|
|
|
"test_ok"
|
|
|
|
# TypeError
|
|
|
|
"testgit"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Linting tool for NASL files";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/greenbone/troubadix";
|
|
|
|
changelog = "https://github.com/greenbone/troubadix/releases/tag/v${version}";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
mainProgram = "troubadix";
|
|
|
|
};
|
|
|
|
}
|