nixpkgs/pkgs/by-name/pe/pentestgpt/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

58 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "pentestgpt";
version = "unstable-2023-06-27";
format = "setuptools";
src = fetchFromGitHub {
owner = "GreyDGL";
repo = "PentestGPT";
rev = "e63a91f466a035e036827e8f492bc47c5c1135af";
hash = "sha256-m0R/kMmbr5Ixuqvw6ZRoaAGCnI3j86Iwk4+TYqv0WbU=";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace "playwright==1.28.0" "playwright" \
--replace "beautifulsoup4~=4.11.2" "" \
--replace "black" "" \
--replace "pytest" ""
'';
propagatedBuildInputs = with python3.pkgs; [
beautifulsoup4
colorama
google
langchain
loguru
openai
playwright
prompt-toolkit
pycookiecheat
pyyaml
requests
rich
sqlmap
tiktoken
];
# Tests require network access
doCheck = false;
pythonImportsCheck = [
"pentestgpt"
];
meta = with lib; {
description = "GPT-empowered penetration testing tool";
homepage = "https://github.com/GreyDGL/PentestGPT";
changelog = "https://github.com/GreyDGL/PentestGPT/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}