about summary refs log tree commit diff
path: root/pkgs/tools/security/go365/default.nix
blob: 381df6d74629fa9bda3ffad42635fb18d93c96ed (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
32
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
  pname = "go365";
  version = "2.0";

  src = fetchFromGitHub {
    owner = "optiv";
    repo = "Go365";
    rev = "refs/tags/v${version}";
    hash = "sha256-jmsbZrqc6XogUhuEWcU59v88id2uLqN/68URwylzWZI=";
  };

  vendorHash = "sha256-Io+69kIW4DV2EkA73pjaTcTRbDSYBf61R7F+141Jojs=";

  postInstall = lib.optionalString (!stdenv.isDarwin) ''
    mv $out/bin/Go365 $out/bin/$pname
  '';

  meta = with lib; {
    description = "Office 365 enumeration tool";
    homepage = "https://github.com/optiv/Go365";
    changelog = "https://github.com/optiv/Go365/releases/tag/v${version}";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
    mainProgram = "Go365";
  };
}