1{ lib
2, stdenv
3, fetchFromGitHub
4, installShellFiles
5, libcap
6, openssl
7, pkg-config
8, rustPlatform
9, Security
10, zlib
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "authoscope";
15 version = "0.8.1";
16
17 src = fetchFromGitHub {
18 owner = "kpcyrd";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "sha256-SKgb/N249s0+Rb59moBT/MeFb4zAAElCMQJto0diyUk=";
22 };
23
24 cargoSha256 = "sha256-rSHuKy86iJNLAKSVcb7fn7A/cc75EOc97jGI14EaC6k=";
25
26 nativeBuildInputs = [
27 installShellFiles
28 pkg-config
29 ];
30
31 buildInputs = [
32 libcap
33 zlib
34 openssl
35 ] ++ lib.optional stdenv.isDarwin Security;
36
37 postInstall = ''
38 installManPage docs/${pname}.1
39 '';
40
41 # Tests requires access to httpin.org
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Scriptable network authentication cracker";
46 homepage = "https://github.com/kpcyrd/authoscope";
47 license = with licenses; [ gpl3Plus ];
48 maintainers = with maintainers; [ fab ];
49 };
50}