netexec: fix test by using pytestCheckHook

This commit is contained in:
Thiago Kenji Okada 2024-01-09 19:00:47 +00:00
parent cf50dc9229
commit 9f13a17f17

View File

@ -78,7 +78,6 @@ python.pkgs.buildPythonApplication rec {
pname = "netexec";
version = "1.1.0";
pyproject = true;
doCheck = true;
pythonRelaxDeps = true;
src = fetchFromGitHub {
@ -88,6 +87,14 @@ python.pkgs.buildPythonApplication rec {
hash = "sha256-cNkZoIdfrKs5ZvHGKGBybCWGwA6C4rqjCOEM+pX70S8=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '{ git = "https://github.com/Pennyw0rth/impacket.git", branch = "gkdi" }' '"*"'
substituteInPlace pyproject.toml \
--replace '{ git = "https://github.com/Pennyw0rth/oscrypto" }' '"*"'
'';
nativeBuildInputs = with python.pkgs; [
poetry-core
pythonRelaxDepsHook
@ -126,19 +133,15 @@ python.pkgs.buildPythonApplication rec {
];
nativeCheckInputs = with python.pkgs; [
pytest
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace '{ git = "https://github.com/Pennyw0rth/impacket.git", branch = "gkdi" }' '"*"'
substituteInPlace pyproject.toml \
--replace '{ git = "https://github.com/Pennyw0rth/oscrypto" }' '"*"'
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = with lib; {
description = "Network service exploitation tool (Maintaned fork of CrackMapExec)";
description = "Network service exploitation tool (maintained fork of CrackMapExec)";
homepage = "https://github.com/Pennyw0rth/NetExec";
changelog = "https://github.com/Pennyw0rth/NetExec/releases/tag/v${version}";
license = with licenses; [ bsd2 ];