about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ga/gato/package.nix
blob: 655b60b2b8390c322e739374926b25ff04a9a266 (plain) (blame)
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
{ lib
, python3
, git
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "gato";
  version = "1.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "praetorian-inc";
    repo = "gato";
    rev = "refs/tags/${version}";
    hash = "sha256-vXQFgP0KDWo1VWe7tMGCB2yEYlr/1KMXsiNupBVLBqc=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "--cov=gato" ""
  '';

  nativeBuildInputs = with python3.pkgs; [
    setuptools
    wheel
  ];

  propagatedBuildInputs = with python3.pkgs; [
    colorama
    cryptography
    packaging
    pyyaml
    requests
  ];

  nativeCheckInputs = with python3.pkgs; [
    git
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "gato"
  ];

  meta = with lib; {
    description = "GitHub Self-Hosted Runner Enumeration and Attack Tool";
    homepage = "https://github.com/praetorian-inc/gato";
    changelog = "https://github.com/praetorian-inc/gato/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
    mainProgram = "gato";
  };
}