depot/third_party/nixpkgs/pkgs/by-name/tr/troubadix/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

62 lines
1.2 KiB
Nix

{
lib,
fetchFromGitHub,
git,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "troubadix";
version = "24.6.5";
pyproject = true;
src = fetchFromGitHub {
owner = "greenbone";
repo = "troubadix";
rev = "refs/tags/v${version}";
hash = "sha256-W6RC0JKTBLlPSgWlAggU8HRNY+nRAYtLlG0cnnYMaFM=";
};
pythonRelaxDeps = [ "validators" ];
build-system = with python3.pkgs; [ poetry-core ];
nativeBuildInputs = with python3.pkgs; [ pythonRelaxDepsHook ];
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; {
description = "Linting tool for NASL files";
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";
};
}