summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ne/netscan/package.nix
blob: 35695cadd3799a84c0d9c1a39edbb52cbbfd4abf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  fetchFromGitHub,
  pkg-config,
  rustPlatform,
  sqlite,
  versionCheckHook,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "netscan";
  version = "0.8.1";

  src = fetchFromGitHub {
    owner = "matthart1983";
    repo = "netscan";
    tag = "v${finalAttrs.version}";
    hash = "sha256-eWUUEdin8v8NIDEDJaHzKYaMyHeyp6d0ar23GkWvZLY=";
  };

  __structuredAttrs = true;

  cargoHash = "sha256-4mhVNr62NrCPR5W7Qkfg2LAPInOltyfG/nyITROEKJY=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ sqlite ];

  nativeCheckInputs = [ versionCheckHook ];

  doInstallCheck = true;

  versionCheckProgramArg = [ "-V" ];

  meta = {
    description = "TUI workflow for nmap with scan history";
    homepage = "https://github.com/matthart1983/netscan";
    changelog = "https://github.com/matthart1983/netscan/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
    mainProgram = "netscan";
  };
})