diff --git a/pkgs/by-name/ss/ssm-session-manager-plugin/package.nix b/pkgs/by-name/ss/ssm-session-manager-plugin/package.nix index a3be74879368..b50cfbd38ac2 100644 --- a/pkgs/by-name/ss/ssm-session-manager-plugin/package.nix +++ b/pkgs/by-name/ss/ssm-session-manager-plugin/package.nix @@ -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