about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/ec2stepshell/default.nix
blob: ff6ee22b08eb6d306b1e79c110f0103d4251e461 (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
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "ec2stepshell";
  version = "unstable-2023-04-07";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "saw-your-packet";
    repo = "EC2StepShell";
    rev = "ab1298fa7f2650de711e86e870a693dcce0e1935";
    hash = "sha256-zy33CgGwa2pBYouqaJ1LM6uRIh3Q1uxi2zNXpDNPsuQ=";
  };

  postPatch = ''
    # https://github.com/saw-your-packet/EC2StepShell/pull/1
    substituteInPlace pyproject.toml \
      --replace "realpython" "ec2stepshell"
  '';

  nativeBuildInputs = with python3.pkgs; [
    setuptools
  ];

  propagatedBuildInputs = with python3.pkgs; [
    boto3
    colorama
    pyfiglet
    termcolor
  ];

  pythonImportsCheck = [
    "ec2stepshell"
  ];

  meta = with lib; {
    description = "AWS post-exploitation tool";
    homepage = "https://github.com/saw-your-packet/EC2StepShell";
    changelog = "https://github.com/saw-your-packet/EC2StepShell/blob/${version}/CHANGELOG.txt";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}