Loading pkgs/by-name/sh/sherlock/fix-sherlock-bin-test.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line 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: pkgs/tools/security/sherlock/default.nix→pkgs/by-name/sh/sherlock/package.nix +33 −17 Original line number Diff line number Diff line Loading @@ -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; [ Loading @@ -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 cd $out/share/sherlock for tests in all test_multiple_usernames; do ${python3.interpreter} -m unittest tests.$tests --verbose done pythonRelaxDeps = [ "stem" ]; runHook postCheck ''; pytestFlagsArray = [ "-m" "'not online'" ]; passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; Loading pkgs/top-level/all-packages.nix +0 −2 Original line number Diff line number Diff line Loading @@ -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
pkgs/by-name/sh/sherlock/fix-sherlock-bin-test.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line 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:
pkgs/tools/security/sherlock/default.nix→pkgs/by-name/sh/sherlock/package.nix +33 −17 Original line number Diff line number Diff line Loading @@ -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; [ Loading @@ -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 cd $out/share/sherlock for tests in all test_multiple_usernames; do ${python3.interpreter} -m unittest tests.$tests --verbose done pythonRelaxDeps = [ "stem" ]; runHook postCheck ''; pytestFlagsArray = [ "-m" "'not online'" ]; passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; Loading
pkgs/top-level/all-packages.nix +0 −2 Original line number Diff line number Diff line Loading @@ -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 { };