diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2022-05-13 12:44:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 12:44:48 +0200 |
commit | 5ae0b4d58f8a9e0f160e28cf3bcf0966835b86d3 (patch) | |
tree | e916e7b99b70f0a76689b109d33631dfdeaf1739 /pkgs/tools | |
parent | 2331cd99fa1f3d912acdf93ab74b2990fdc9594a (diff) | |
parent | ba114515f67a97a7a168bcd6f51b5cd84e6aa9ac (diff) |
Merge pull request #172361 from fabaff/cliam
cliam: init at 1.0.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/cliam/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/security/cliam/default.nix b/pkgs/tools/security/cliam/default.nix new file mode 100644 index 0000000000000..7b7ee342a12da --- /dev/null +++ b/pkgs/tools/security/cliam/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: + +buildGoModule rec { + pname = "cliam"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "securisec"; + repo = pname; + rev = version; + hash = "sha256-bq7u6pknokyY4WwO1qMYPuY86UZlDgeYEa1AJpk8d+4="; + }; + + vendorSha256 = "sha256-aGBA97EvIUv9myqcrtltiVxh1/0VtrQy2j9GU6r197g="; + + nativeBuildInputs = [ + installShellFiles + ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/securisec/cliam/cli/version.Version=${version}" + ]; + + postBuild = '' + # should be called cliam + mv $GOPATH/bin/{cli,cliam} + ''; + + postInstall = '' + installShellCompletion --cmd cliam \ + --bash <($out/bin/cliam completion bash) \ + --fish <($out/bin/cliam completion fish) \ + --zsh <($out/bin/cliam completion zsh) + ''; + + meta = with lib; { + description = "Cloud agnostic IAM permissions enumerator"; + homepage = "https://github.com/securisec/cliam"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} |