1{ lib
2, python3
3, fetchFromGitHub
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "ec2stepshell";
8 version = "unstable-2023-04-07";
9 format = "pyproject";
10
11 src = fetchFromGitHub {
12 owner = "saw-your-packet";
13 repo = "EC2StepShell";
14 rev = "ab1298fa7f2650de711e86e870a693dcce0e1935";
15 hash = "sha256-zy33CgGwa2pBYouqaJ1LM6uRIh3Q1uxi2zNXpDNPsuQ=";
16 };
17
18 postPatch = ''
19 # https://github.com/saw-your-packet/EC2StepShell/pull/1
20 substituteInPlace pyproject.toml \
21 --replace "realpython" "ec2stepshell"
22 '';
23
24 nativeBuildInputs = with python3.pkgs; [
25 setuptools
26 ];
27
28 propagatedBuildInputs = with python3.pkgs; [
29 boto3
30 colorama
31 pyfiglet
32 termcolor
33 ];
34
35 pythonImportsCheck = [
36 "ec2stepshell"
37 ];
38
39 meta = with lib; {
40 description = "AWS post-exploitation tool";
41 homepage = "https://github.com/saw-your-packet/EC2StepShell";
42 changelog = "https://github.com/saw-your-packet/EC2StepShell/blob/${version}/CHANGELOG.txt";
43 license = licenses.mit;
44 maintainers = with maintainers; [ fab ];
45 };
46}