depot/third_party/nixpkgs/pkgs/tools/security/sherlock/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

74 lines
1.5 KiB
Nix

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