nixpkgs/pkgs/tools/admin/aws-sso-cli/default.nix
Emery Hemingway b5526585c2 treewide: inject xdg-open into wrappers as $PATH suffix
The xdg-open utility is only ever a runtime dependency and its
dependents only expect that it accept a URI as a command line
argument and do something with it that the user would expect.
For such as a trivial relationship it should be possible for
users to override xdg-open with something else in their PATH.
2022-08-19 13:11:27 -05:00

34 lines
850 B
Nix

{ buildGoModule
, fetchFromGitHub
, lib
, makeWrapper
, xdg-utils
}:
buildGoModule rec {
pname = "aws-sso-cli";
version = "1.9.2";
src = fetchFromGitHub {
owner = "synfinatic";
repo = pname;
rev = "v${version}";
sha256 = "9/dZfRmFAyE5NEMmuiVsRvwgqQrTNhXkTR9N0d3zgfk=";
};
vendorSha256 = "BlSCLvlrKiubMtfFSZ5ppMmL2ZhJcBXxJfeRgMADYB4=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
mv $out/bin/cmd $out/bin/aws-sso
wrapProgram $out/bin/aws-sso \
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
'';
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";
};
}