saml2aws: install shell completion (#339219)
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
{ lib, stdenv, buildGoModule, fetchFromGitHub, AppKit }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
AppKit,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "saml2aws";
|
||||
@@ -13,19 +20,29 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-gtl8T8wXnpLgDZc6qSgFKpA+XbcLNHf20ieBkyNdE+s=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
|
||||
|
||||
subPackages = [ "." "cmd/saml2aws" ];
|
||||
subPackages = [
|
||||
"."
|
||||
"cmd/saml2aws"
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-X main.Version=${version}"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd saml2aws \
|
||||
--bash <($out/bin/saml2aws --completion-script-bash) \
|
||||
--zsh <($out/bin/saml2aws --completion-script-zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP";
|
||||
mainProgram = "saml2aws";
|
||||
homepage = "https://github.com/Versent/saml2aws";
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/Versent/saml2aws";
|
||||
license = licenses.mit;
|
||||
maintainers = [ lib.maintainers.pmyjavec ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user