Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / sn / sn0int / package.nix
blob2410fa0cc230bb268eaeaca2bb40e6cf8d4a5f8d
1 { lib
2 , fetchFromGitHub
3 , rustPlatform
4 , libseccomp
5 , libsodium
6 , pkg-config
7 , pkgs
8 , sqlite
9 , stdenv
10 , installShellFiles
13 rustPlatform.buildRustPackage rec {
14   pname = "sn0int";
15   version = "0.26.0";
17   src = fetchFromGitHub {
18     owner = "kpcyrd";
19     repo = pname;
20     rev = "refs/tags/v${version}";
21     hash = "sha256-ze4OFKUuc/t6tXgmoWFFDjpAQraSY6RIekkcDBctPJo=";
22   };
24   cargoHash = "sha256-PAKmoifqB1YC02fVF2SRbXAAGrMcB+Wlvr3FwuqmPVU=";
26   nativeBuildInputs = [
27     pkg-config
28     installShellFiles
29   ];
31   buildInputs = [
32     libsodium
33     sqlite
34   ] ++ lib.optionals stdenv.isLinux [
35     libseccomp
36   ] ++ lib.optionals stdenv.isDarwin [
37     pkgs.darwin.apple_sdk.frameworks.Security
38   ];
40   # One of the dependencies (chrootable-https) tries to read "/etc/resolv.conf"
41   # in "checkPhase", hence fails in sandbox of "nix".
42   doCheck = false;
44   postInstall = ''
45     installShellCompletion --cmd sn0int \
46       --bash <($out/bin/sn0int completions bash) \
47       --fish <($out/bin/sn0int completions fish) \
48       --zsh  <($out/bin/sn0int completions zsh)
49   '';
51   meta = with lib; {
52     description = "Semi-automatic OSINT framework and package manager";
53     homepage = "https://github.com/kpcyrd/sn0int";
54     changelog = "https://github.com/kpcyrd/sn0int/releases/tag/v${version}";
55     license = with licenses; [ gpl3Plus ];
56     maintainers = with maintainers; [ fab xrelkd ];
57     platforms = platforms.linux ++ platforms.darwin;
58     mainProgram = "sn0int";
59   };