2024-08-07 23:47:32 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
makeWrapper,
|
|
|
|
python3,
|
|
|
|
poetry,
|
2023-11-10 15:32:26 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-08-09 06:03:42 +00:00
|
|
|
pname = "sherlock";
|
2024-08-07 23:45:27 +00:00
|
|
|
version = "0.15.0";
|
2024-06-10 13:17:41 +00:00
|
|
|
format = "pyproject";
|
2021-08-09 06:03:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sherlock-project";
|
2024-05-12 14:37:44 +00:00
|
|
|
repo = "sherlock";
|
2024-08-07 23:45:27 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-+fQDvvwsLpiEvy+vC49AzlOA/KaKrhhpS97sZvFbpLA=";
|
2021-08-09 06:03:42 +00:00
|
|
|
};
|
|
|
|
|
2024-06-10 13:17:41 +00:00
|
|
|
patches = [
|
|
|
|
# Avoid hardcoding sherlock
|
|
|
|
./fix-sherlock-bin-test.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/sherlock_interactives.py \
|
|
|
|
--replace @sherlockBin@ "$out/bin/sherlock"
|
|
|
|
'';
|
|
|
|
|
2021-08-09 06:03:42 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-11-10 15:32:26 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
certifi
|
|
|
|
colorama
|
|
|
|
pandas
|
|
|
|
pysocks
|
|
|
|
requests
|
|
|
|
requests-futures
|
|
|
|
stem
|
|
|
|
torrequest
|
|
|
|
];
|
2021-08-09 06:03:42 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-11-10 15:32:26 +00:00
|
|
|
|
2021-08-09 06:03:42 +00:00
|
|
|
mkdir -p $out/bin $out/share
|
2024-08-07 23:45:27 +00:00
|
|
|
cp -R ./sherlock_project $out/share
|
2023-11-10 15:32:26 +00:00
|
|
|
|
2021-08-09 06:03:42 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-11-10 15:32:26 +00:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapper ${python3.interpreter} $out/bin/sherlock \
|
2024-06-10 13:17:41 +00:00
|
|
|
--add-flags "-m" \
|
2024-08-07 23:45:27 +00:00
|
|
|
--add-flags "sherlock_project" \
|
2024-06-10 13:17:41 +00:00
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH:$out/share"
|
2023-11-10 15:32:26 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-10 13:17:41 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
poetry
|
|
|
|
poetry-core
|
|
|
|
jsonschema
|
|
|
|
openpyxl
|
|
|
|
stem
|
2023-11-10 15:32:26 +00:00
|
|
|
];
|
|
|
|
|
2024-08-07 23:47:32 +00:00
|
|
|
pythonRelaxDeps = [ "stem" ];
|
2023-11-10 15:32:26 +00:00
|
|
|
|
2024-06-10 13:17:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m"
|
|
|
|
"'not online'"
|
|
|
|
];
|
2021-08-09 06:03:42 +00:00
|
|
|
|
2024-08-07 23:49:58 +00:00
|
|
|
meta = {
|
2024-10-30 19:59:29 +00:00
|
|
|
homepage = "https://sherlockproject.xyz/";
|
2021-08-09 06:03:42 +00:00
|
|
|
description = "Hunt down social media accounts by username across social networks";
|
2024-08-07 23:49:58 +00:00
|
|
|
license = lib.licenses.mit;
|
2023-11-10 15:32:26 +00:00
|
|
|
mainProgram = "sherlock";
|
2024-08-07 23:49:58 +00:00
|
|
|
maintainers = with lib.maintainers; [ applePrincess ];
|
2021-08-09 06:03:42 +00:00
|
|
|
};
|
|
|
|
}
|