Merge pull request #329929 from flohessling/fix-sessionmanagerplugin-build

ssm-session-manager-plugin: fix executable name
This commit is contained in:
Atemu 2024-07-29 23:55:44 +02:00 committed by GitHub
commit a457f213a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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