2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, libseccomp
|
2024-01-25 14:12:00 +00:00
|
|
|
, libsodium
|
2021-05-28 09:39:13 +00:00
|
|
|
, pkg-config
|
2024-01-25 14:12:00 +00:00
|
|
|
, pkgs
|
|
|
|
, sqlite
|
|
|
|
, stdenv
|
2024-02-29 20:09:43 +00:00
|
|
|
, installShellFiles
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sn0int";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.26.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kpcyrd";
|
|
|
|
repo = pname;
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-ze4OFKUuc/t6tXgmoWFFDjpAQraSY6RIekkcDBctPJo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-PAKmoifqB1YC02fVF2SRbXAAGrMcB+Wlvr3FwuqmPVU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-02-29 20:09:43 +00:00
|
|
|
installShellFiles
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
buildInputs = [
|
|
|
|
libsodium
|
|
|
|
sqlite
|
2024-01-25 14:12:00 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libseccomp
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
pkgs.darwin.apple_sdk.frameworks.Security
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# One of the dependencies (chrootable-https) tries to read "/etc/resolv.conf"
|
|
|
|
# in "checkPhase", hence fails in sandbox of "nix".
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd sn0int \
|
|
|
|
--bash <($out/bin/sn0int completions bash) \
|
|
|
|
--fish <($out/bin/sn0int completions fish) \
|
|
|
|
--zsh <($out/bin/sn0int completions zsh)
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Semi-automatic OSINT framework and package manager";
|
|
|
|
homepage = "https://github.com/kpcyrd/sn0int";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/kpcyrd/sn0int/releases/tag/v${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ gpl3Plus ];
|
2023-02-16 17:41:37 +00:00
|
|
|
maintainers = with maintainers; [ fab xrelkd ];
|
2024-01-25 14:12:00 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "sn0int";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|