1
Fork 0

Added sherlock

This commit is contained in:
Matei Adriel 2023-03-01 16:58:56 +01:00
parent 71a45e4575
commit 7b45cb7697
No known key found for this signature in database
3 changed files with 59 additions and 3 deletions

View file

@ -7,7 +7,9 @@
./features/desktop/common/firefox.nix ./features/desktop/common/firefox.nix
]; ];
# Arbitrary extra packages
home.packages = with pkgs; [ home.packages = with pkgs; [
# Desktop apps
signal-desktop # Signal client signal-desktop # Signal client
zoom-us # Zoom client 🤮 zoom-us # Zoom client 🤮
obsidian # Notes obsidian # Notes
@ -15,10 +17,12 @@
vlc # Video player vlc # Video player
gimp # Image editing gimp # Image editing
libreoffice # Free office suite libreoffice # Free office suite
lmms # music software lmms # Music software
agenix # secret encryption
# obs-studio # video recorder # obs-studio # video recorder
# Clis
agenix # Secret encryption
sherlock # Search for usernames across different websites
]; ];
home.sessionVariables.QT_SCREEN_SCALE_FACTOR = 1.4; # Bigger text in qt apps home.sessionVariables.QT_SCREEN_SCALE_FACTOR = 1.4; # Bigger text in qt apps

View file

@ -4,6 +4,7 @@
{ pkgs ? (import ../nixpkgs.nix) { } }: { { pkgs ? (import ../nixpkgs.nix) { } }: {
# example = pkgs.callPackage (import ./example.nix) {}; # example = pkgs.callPackage (import ./example.nix) {};
vimclip = pkgs.callPackage (import ./vimclip.nix) {}; vimclip = pkgs.callPackage (import ./vimclip.nix) {};
sherlock = pkgs.callPackage (import ./sherlock.nix) {};
plymouthThemes = pkgs.callPackage (import ./plymouth-themes.nix) {}; plymouthThemes = pkgs.callPackage (import ./plymouth-themes.nix) {};
} }

51
pkgs/sherlock.nix Normal file
View file

@ -0,0 +1,51 @@
# Up to date version of [this](https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/tools/security/sherlock/default.nix)
{ stdenv, lib, fetchFromGitHub, python3, makeWrapper }:
let
pyenv = python3.withPackages (pp: with pp; [
beautifulsoup4
certifi
colorama
lxml
pysocks
requests
requests-futures
soupsieve
stem
torrequest
pandas
]);
in
stdenv.mkDerivation rec {
pname = "sherlock";
version = "unstable-2023-02-27";
src = fetchFromGitHub {
owner = "sherlock-project";
repo = "sherlock";
rev = "61bb34b0213482164247df496a063b9e41b98f78";
sha256 = "0lnwph8vvxj47bx3dys4f2g4zixp791xhhijwa4y81rihlr0q89l";
};
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
substituteInPlace sherlock/sherlock.py \
--replace "os.path.dirname(__file__)" "\"$out/share\""
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
cp ./sherlock/*.py $out/bin/
cp --recursive ./sherlock/resources/ $out/share
makeWrapper ${pyenv.interpreter} $out/bin/sherlock --add-flags "$out/bin/sherlock.py"
runHook postInstall
'';
checkPhase = ''
runHook preCheck
cd $srcRoot/sherlock
${pyenv.interpreter} -m unittest tests.all.SherlockSiteCoverageTests --verbose
runHook postCheck
'';
}