mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
Merge pull request #313395 from applePrincess/sherlock-tox
sherlock: 0-unstable-2024-06-04 -> 0-unstable-2024-06-09
This commit is contained in:
commit
54bc082f5a
19
pkgs/by-name/sh/sherlock/fix-sherlock-bin-test.patch
Normal file
19
pkgs/by-name/sh/sherlock/fix-sherlock-bin-test.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit 34d1da31d87d90beae1dacd303ab166cecbd2baa
|
||||
Author: Lein Matsumaru <applePrincess@applePrincess.io>
|
||||
Date: Tue May 21 12:22:12 2024 +0000
|
||||
|
||||
b
|
||||
|
||||
diff --git a/tests/sherlock_interactives.py b/tests/sherlock_interactives.py
|
||||
index d0424af..59c7bd2 100644
|
||||
--- a/tests/sherlock_interactives.py
|
||||
+++ b/tests/sherlock_interactives.py
|
||||
@@ -10,7 +10,7 @@ class Interactives:
|
||||
if platform.system == "Windows":
|
||||
command:str = f"py -m sherlock {args}"
|
||||
else:
|
||||
- command:str = f"sherlock {args}"
|
||||
+ command:str = f"@sherlockBin@ {args}"
|
||||
|
||||
proc_out:str = ""
|
||||
try:
|
@ -3,20 +3,31 @@
|
||||
, makeWrapper
|
||||
, python3
|
||||
, unstableGitUpdater
|
||||
, poetry
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "sherlock";
|
||||
version = "0-unstable-2024-06-04";
|
||||
format = "other";
|
||||
version = "0-unstable-2024-06-09";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sherlock-project";
|
||||
repo = "sherlock";
|
||||
rev = "ef124acf34e90626f4e59ab88bba1ed6141a4126";
|
||||
hash = "sha256-haxUKdZuuJrSI4TH8jA1fT+4fhr6tlxnrEgWTuBuIC4=";
|
||||
rev = "d678908c00f16c7f6c44efc0357cef713fa96739";
|
||||
hash = "sha256-XAXDqbdHQta9OiupbPmmyp3TK1VLtDQ7CadsOei/6rs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Avoid hardcoding sherlock
|
||||
./fix-sherlock-bin-test.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/sherlock_interactives.py \
|
||||
--replace @sherlockBin@ "$out/bin/sherlock"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
@ -41,24 +52,29 @@ python3.pkgs.buildPythonApplication rec {
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${python3.interpreter} $out/bin/sherlock \
|
||||
--add-flags $out/share/sherlock/sherlock.py \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH"
|
||||
--add-flags "-m" \
|
||||
--add-flags "sherlock" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH:$out/share"
|
||||
'';
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
exrex
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
poetry
|
||||
poetry-core
|
||||
jsonschema
|
||||
openpyxl
|
||||
stem
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
pythonRelaxDeps = [
|
||||
"stem"
|
||||
];
|
||||
|
||||
cd $out/share/sherlock
|
||||
for tests in all test_multiple_usernames; do
|
||||
${python3.interpreter} -m unittest tests.$tests --verbose
|
||||
done
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
pytestFlagsArray = [
|
||||
"-m"
|
||||
"'not online'"
|
||||
];
|
||||
|
||||
passthru.updateScript = unstableGitUpdater {
|
||||
hardcodeZeroVersion = true;
|
@ -30649,8 +30649,6 @@ with pkgs;
|
||||
|
||||
gjay = callPackage ../applications/audio/gjay { };
|
||||
|
||||
sherlock = callPackage ../tools/security/sherlock { };
|
||||
|
||||
stratovirt = callPackage ../applications/virtualization/stratovirt { };
|
||||
|
||||
rhythmbox = callPackage ../applications/audio/rhythmbox { };
|
||||
|
Loading…
Reference in New Issue
Block a user