2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchpatch
|
2021-09-23 15:35:13 +00:00
|
|
|
, paho-mqtt
|
|
|
|
, poetry-core
|
|
|
|
, psutil
|
|
|
|
, pytestCheckHook
|
2023-04-12 12:48:02 +00:00
|
|
|
, python-gnupg
|
2021-09-23 15:35:13 +00:00
|
|
|
, pythonOlder
|
2023-04-12 12:48:02 +00:00
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, sentry-sdk
|
|
|
|
, tomli
|
2021-09-23 15:35:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notus-scanner";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "22.5.0";
|
2021-09-23 15:35:13 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greenbone";
|
|
|
|
repo = pname;
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-h+jZWjDvTfW9XjoGhWYX08hgJ/Qp64MEaqHHwnahnC4=";
|
2021-09-23 15:35:13 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-packaging-dependency.patch";
|
|
|
|
url = "https://github.com/greenbone/notus-scanner/commit/bfa7d3d2e63e250ff25a66c60b782eb9da0e89e7.patch";
|
|
|
|
hash = "sha256-hzS8TYBXDEq+cgWlp6fSOtSbyeX9EX2rURmnFMF5jN0=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"python-gnupg"
|
|
|
|
];
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonRelaxDepsHook
|
2021-09-23 15:35:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
paho-mqtt
|
|
|
|
psutil
|
2023-04-12 12:48:02 +00:00
|
|
|
python-gnupg
|
|
|
|
sentry-sdk
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2021-09-23 15:35:13 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-23 15:35:13 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"notus.scanner"
|
2021-09-23 15:35:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Helper to create results from local security checks";
|
|
|
|
homepage = "https://github.com/greenbone/notus-scanner";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/greenbone/notus-scanner/releases/tag/v${version}";
|
2021-09-23 15:35:13 +00:00
|
|
|
license = with licenses; [ agpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|