2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-06-26 10:26:21 +00:00
|
|
|
pname = "sherlock";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "unstable-2023-10-06";
|
|
|
|
format = "other";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sherlock-project";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "7ec56895a37ada47edd6573249c553379254d14a";
|
|
|
|
hash = "sha256-bK5yEdh830vgKcsU3gLH7TybLncnX6eRIiYPUiVWM74=";
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|