summary refs log tree commit diff
path: root/pkgs/tools/security/nmap-formatter/default.nix
blob: 3f3835b9649dd1ed33c63ca6bb0407c141ab1585 (plain) (blame)
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
{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "nmap-formatter";
  version = "0.2.1";

  src = fetchFromGitHub {
    owner = "vdjagilev";
    repo = pname;
    rev = "v${version}";
    sha256 = "1r8l7ajcb436b60ir6xgy53wafk6rw1cil326yg6mhcngz9sazbk";
  };

  vendorSha256 = "0c1b4iw28qj8iq55lg32xqw69jjdv5ial495j0gz68s17kydbwhb";

  postPatch = ''
    # Fix hard-coded release
    substituteInPlace cmd/root.go \
      --replace "0.2.0" "${version}"
  '';

  meta = with lib; {
    description = "Tool that allows you to convert nmap output";
    homepage = "https://github.com/vdjagilev/nmap-formatter";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}