mitmproxy: relax some dependencies to fix build (#380668)
[NixPkgs.git] / pkgs / by-name / sn / sn0int / package.nix
blob9924b3a27384374e56062fbeea702f392ebe0bb6
2   lib,
3   fetchFromGitHub,
4   rustPlatform,
5   libseccomp,
6   libsodium,
7   pkg-config,
8   pkgs,
9   sqlite,
10   stdenv,
11   installShellFiles,
14 rustPlatform.buildRustPackage rec {
15   pname = "sn0int";
16   version = "0.26.1";
18   src = fetchFromGitHub {
19     owner = "kpcyrd";
20     repo = pname;
21     tag = "v${version}";
22     hash = "sha256-tiJLwlxZ9ndircgkH23ew+3QJeuuqt93JahAtFPcuG8=";
23   };
25   useFetchCargoVendor = true;
26   cargoHash = "sha256-nDgWNm5HTvFEMQhUUnU7o2Rpzl3/bGwyB0N9Z1KorDs=";
28   nativeBuildInputs = [
29     pkg-config
30     installShellFiles
31   ];
33   buildInputs =
34     [
35       libsodium
36       sqlite
37     ]
38     ++ lib.optionals stdenv.hostPlatform.isLinux [
39       libseccomp
40     ]
41     ++ lib.optionals stdenv.hostPlatform.isDarwin [
42       pkgs.darwin.apple_sdk.frameworks.Security
43     ];
45   # One of the dependencies (chrootable-https) tries to read "/etc/resolv.conf"
46   # in "checkPhase", hence fails in sandbox of "nix".
47   doCheck = false;
49   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
50     installShellCompletion --cmd sn0int \
51       --bash <($out/bin/sn0int completions bash) \
52       --fish <($out/bin/sn0int completions fish) \
53       --zsh  <($out/bin/sn0int completions zsh)
54   '';
56   meta = with lib; {
57     description = "Semi-automatic OSINT framework and package manager";
58     homepage = "https://github.com/kpcyrd/sn0int";
59     changelog = "https://github.com/kpcyrd/sn0int/releases/tag/v${version}";
60     license = with licenses; [ gpl3Plus ];
61     maintainers = with maintainers; [
62       fab
63       xrelkd
64     ];
65     platforms = platforms.linux ++ platforms.darwin;
66     mainProgram = "sn0int";
67   };