1{ lib
2, buildGoModule
3, fetchFromGitHub
4, makeBinaryWrapper
5}:
6
7buildGoModule rec {
8 pname = "cloud-nuke";
9 version = "0.32.0";
10
11 src = fetchFromGitHub {
12 owner = "gruntwork-io";
13 repo = pname;
14 rev = "refs/tags/v${version}";
15 hash = "sha256-jxhFBfz5CWycEXx86jL9inlP8nxNK7vbVn2U8EzQ7QA=";
16 };
17
18 vendorHash = "sha256-C2YXjfn3Pk0kL4G/cHsmr2VHUYGO+3s3eSiWVJZ2dX8=";
19
20 nativeBuildInputs = [
21 makeBinaryWrapper
22 ];
23
24 ldflags = [
25 "-s"
26 "-w"
27 "-X=main.VERSION=${version}"
28 ];
29
30 doCheck = false;
31
32 postInstall = ''
33 wrapProgram $out/bin/cloud-nuke --set-default DISABLE_TELEMETRY true
34 '';
35
36 meta = with lib; {
37 homepage = "https://github.com/gruntwork-io/cloud-nuke";
38 description = "A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it";
39 changelog = "https://github.com/gruntwork-io/cloud-nuke/releases/tag/v${version}";
40 license = licenses.mit;
41 maintainers = with maintainers; [ marsam ];
42 };
43}