nixpkgs/pkgs/by-name/sh/sherlock/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
1.6 KiB
Nix
Raw Permalink Normal View History

{
lib,
fetchFromGitHub,
makeWrapper,
python3,
poetry,
}:
python3.pkgs.buildPythonApplication rec {
2021-08-09 06:03:42 +00:00
pname = "sherlock";
version = "0.15.0";
format = "pyproject";
2021-08-09 06:03:42 +00:00
src = fetchFromGitHub {
owner = "sherlock-project";
repo = "sherlock";
rev = "refs/tags/v${version}";
hash = "sha256-+fQDvvwsLpiEvy+vC49AzlOA/KaKrhhpS97sZvFbpLA=";
2021-08-09 06:03:42 +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 ];
propagatedBuildInputs = with python3.pkgs; [
certifi
colorama
pandas
pysocks
requests
requests-futures
stem
torrequest
];
2021-08-09 06:03:42 +00:00
installPhase = ''
runHook preInstall
2021-08-09 06:03:42 +00:00
mkdir -p $out/bin $out/share
cp -R ./sherlock_project $out/share
2021-08-09 06:03:42 +00:00
runHook postInstall
'';
postFixup = ''
makeWrapper ${python3.interpreter} $out/bin/sherlock \
--add-flags "-m" \
--add-flags "sherlock_project" \
--prefix PYTHONPATH : "$PYTHONPATH:$out/share"
'';
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
poetry
poetry-core
jsonschema
openpyxl
stem
];
pythonRelaxDeps = [ "stem" ];
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;
mainProgram = "sherlock";
2024-08-07 23:49:58 +00:00
maintainers = with lib.maintainers; [ applePrincess ];
2021-08-09 06:03:42 +00:00
};
}