nixpkgs/pkgs/by-name/aw/aws-nuke/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2021-01-04 19:33:03 +00:00
, buildGoModule
, fetchFromGitHub
2023-09-08 04:20:00 +00:00
, installShellFiles
2021-01-04 19:33:03 +00:00
}:
buildGoModule rec {
pname = "aws-nuke";
2023-09-06 19:03:24 +00:00
version = "2.25.0";
2021-01-04 19:33:03 +00:00
src = fetchFromGitHub {
owner = "rebuy-de";
repo = pname;
rev = "v${version}";
2023-09-06 19:03:24 +00:00
hash = "sha256-Yc9GXdcSKPvwddh+QU2/pBC0XIqA53wpd0VNKOqppbU=";
2021-01-04 19:33:03 +00:00
};
2023-09-06 19:03:24 +00:00
vendorHash = "sha256-FZ92JoyPYysYhl7iQZ8X32BDyNKL1UbOgq7EhHyqb5A=";
2021-01-04 19:33:03 +00:00
2023-09-08 04:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2023-07-28 02:21:23 +00:00
overrideModAttrs = _: {
preBuild = ''
2021-01-04 19:33:03 +00:00
go generate ./...
2023-07-28 02:21:23 +00:00
'';
};
2021-01-04 19:33:03 +00:00
doCheck = false;
subPackages = [ "." ];
2023-09-08 04:20:00 +00:00
ldflags = [ "-s" "-w" ];
2023-09-08 04:20:00 +00:00
postInstall = ''
installShellCompletion --cmd aws-nuke \
--bash <($out/bin/aws-nuke completion bash) \
--fish <($out/bin/aws-nuke completion fish) \
--zsh <($out/bin/aws-nuke completion zsh)
'';
meta = with lib; {
2021-01-04 19:33:03 +00:00
description = "Nuke a whole AWS account and delete all its resources";
homepage = "https://github.com/rebuy-de/aws-nuke";
2023-09-08 04:20:00 +00:00
changelog = "https://github.com/rebuy-de/aws-nuke/releases/tag/v${version}";
2021-01-04 19:33:03 +00:00
license = licenses.mit;
maintainers = with maintainers; [ grahamc ];
2024-02-11 02:19:15 +00:00
mainProgram = "aws-nuke";
2021-01-04 19:33:03 +00:00
};
}