1{ buildGoModule
2, fetchFromGitHub
3, lib
4, makeWrapper
5, xdg-utils
6}:
7buildGoModule rec {
8 pname = "aws-sso-cli";
9 version = "1.13.1";
10
11 src = fetchFromGitHub {
12 owner = "synfinatic";
13 repo = pname;
14 rev = "v${version}";
15 hash = "sha256-QwixApaGUzTmvc9TfFk8bdMU7dxyaeUo5aWucV4tH1c=";
16 };
17 vendorHash = "sha256-/6DCrjOqjbz+olRp7rs8ui4uUrcor0zAc0yOIz+ZcEo=";
18
19 nativeBuildInputs = [ makeWrapper ];
20
21 ldflags = [
22 "-X main.Version=${version}"
23 "-X main.Tag=nixpkgs"
24 ];
25
26 postInstall = ''
27 wrapProgram $out/bin/aws-sso \
28 --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
29 '';
30
31 meta = with lib; {
32 homepage = "https://github.com/synfinatic/aws-sso-cli";
33 description = "AWS SSO CLI is a secure replacement for using the aws configure sso wizard";
34 license = licenses.gpl3Plus;
35 maintainers = with maintainers; [ devusb ];
36 mainProgram = "aws-sso";
37 };
38}