about summary refs log tree commit diff
path: root/pkgs/tools/security/netexec
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2024-01-09 19:00:47 +0000
committerThiago Kenji Okada <thiagokokada@gmail.com>2024-01-23 12:53:58 +0000
commit9f13a17f17886812c62d5418c323d0c3f1fea151 (patch)
treeb2a1300414e89c24a34a49ca4b62e97049d81753 /pkgs/tools/security/netexec
parentcf50dc9229080ae17bfefe5334dd21e3ebdb0548 (diff)
netexec: fix test by using pytestCheckHook
Diffstat (limited to 'pkgs/tools/security/netexec')
-rw-r--r--pkgs/tools/security/netexec/default.nix21
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/tools/security/netexec/default.nix b/pkgs/tools/security/netexec/default.nix
index 2e1394143d63c..73599e8f88d19 100644
--- a/pkgs/tools/security/netexec/default.nix
+++ b/pkgs/tools/security/netexec/default.nix
@@ -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 ];