2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, python3
|
2024-05-15 15:35:15 +00:00
|
|
|
, unstableGitUpdater
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-06-26 10:26:21 +00:00
|
|
|
pname = "sherlock";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "unstable-2024-05-12";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "other";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sherlock-project";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "sherlock";
|
|
|
|
rev = "3e978d774b428dce6eed7afbb6606444e7a74924";
|
|
|
|
hash = "sha256-wa32CSQ9+/PJPep84Tqtzmr6EjD1Bb3guZe5pTOZVnA=";
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
certifi
|
|
|
|
colorama
|
|
|
|
pandas
|
|
|
|
pysocks
|
|
|
|
requests
|
|
|
|
requests-futures
|
|
|
|
stem
|
|
|
|
torrequest
|
|
|
|
];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
mkdir -p $out/bin $out/share
|
2023-11-16 04:20:00 +00:00
|
|
|
cp -R ./sherlock $out/share
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapper ${python3.interpreter} $out/bin/sherlock \
|
|
|
|
--add-flags $out/share/sherlock/sherlock.py \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
exrex
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
cd $out/share/sherlock
|
|
|
|
for tests in all test_multiple_usernames; do
|
|
|
|
${python3.interpreter} -m unittest tests.$tests --verbose
|
|
|
|
done
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
hardcodeZeroVersion = true;
|
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://sherlock-project.github.io/";
|
|
|
|
description = "Hunt down social media accounts by username across social networks";
|
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "sherlock";
|
2022-06-26 10:26:21 +00:00
|
|
|
maintainers = with maintainers; [ applePrincess ];
|
|
|
|
};
|
|
|
|
}
|