2022-07-14 12:49:19 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-07-01 15:47:52 +00:00
|
|
|
, getent
|
2022-07-14 12:49:19 +00:00
|
|
|
, lib
|
|
|
|
, makeWrapper
|
2024-07-01 15:47:52 +00:00
|
|
|
, stdenv
|
2022-07-14 12:49:19 +00:00
|
|
|
, xdg-utils
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aws-sso-cli";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.16.1";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "synfinatic";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-jFeF/nxJMUO0tH8kgLgV6DIvN9KbcTy19LEvu4Paq8M=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2024-07-01 15:47:52 +00:00
|
|
|
vendorHash = "sha256-0ji2i2MSEqd3xxos96FHn9srDOtpvX3mFlaNoiTEa/U=";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
"-X main.Tag=nixpkgs"
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/aws-sso \
|
2022-08-21 13:32:41 +00:00
|
|
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
nativeCheckInputs = [ getent ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
checkFlags = [
|
|
|
|
"-skip=TestAWSConsoleUrl|TestAWSFederatedUrl"
|
2024-07-01 15:47:52 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ "--skip=TestDetectShellBash" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/synfinatic/aws-sso-cli";
|
|
|
|
description = "AWS SSO CLI is a secure replacement for using the aws configure sso wizard";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ devusb ];
|
|
|
|
mainProgram = "aws-sso";
|
|
|
|
};
|
2022-06-26 10:26:21 +00:00
|
|
|
}
|