summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/cyvest/default.nix
blob: 148ee24377fcba093ac2ea5b8bccaaf6a7cf5e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  lib,
  buildPythonPackage,
  click,
  fetchFromGitHub,
  logurich,
  pydantic,
  pytest-cov-stub,
  pytestCheckHook,
  pyvis,
  rich,
  typing-extensions,
  uv-build,
}:

buildPythonPackage (finalAttrs: {
  pname = "cyvest";
  version = "5.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "PakitoSec";
    repo = "cyvest";
    tag = "v${finalAttrs.version}";
    hash = "sha256-FEi/0pWUHFE1ZwDtKt6u2MPFAUeiOqA8LYfoqDu3vzI=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "uv_build>=0.9.8,<0.10.0" "uv_build"
  '';

  pythonRelaxDeps = [ "pydantic" ];

  build-system = [ uv-build ];

  dependencies = [
    click
    logurich
    pydantic
    rich
    typing-extensions
  ];

  optional-dependencies = {
    visualization = [
      pyvis
    ];
  };

  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
  ];

  pythonImportsCheck = [ "cyvest" ];

  meta = {
    description = "Cybersecurity Investigation Model";
    homepage = "https://github.com/PakitoSec/cyvest";
    changelog = "https://github.com/PakitoSec/cyvest/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
})