nixpkgs/pkgs/by-name/ec/ec2stepshell/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.1 KiB
Nix

{ 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";
mainProgram = "ec2stepshell";
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 ];
};
}