ssm-session-manager-plugin: fix executable name

This commit is contained in:
Flo Hessling 2024-07-25 17:30:09 +02:00
parent 12cf457ec1
commit 5a86326716
No known key found for this signature in database

View File

@ -53,8 +53,14 @@ buildGoModule rec {
doCheck = true;
checkFlags = [ "-skip=TestSetSessionHandlers" ];
# The AWS CLI is expecting the binary name to be 'session-manager-plugin' and
# since the outfile is different the following workaround is renaming the binary.
postBuild = ''
mv $GOPATH/bin/sessionmanagerplugin-main $GOPATH/bin/${meta.mainProgram}
'';
preCheck = ''
if ! [[ $($GOPATH/bin/sessionmanagerplugin-main --version) = ${lib.escapeShellArg version} ]]; then
if ! [[ $($GOPATH/bin/${meta.mainProgram} --version) = ${lib.escapeShellArg version} ]]; then
echo 'wrong version'
exit 1
fi