How to rotate a sprite in 2D with LWJGL3 and GLSL

I have all the basic rendering already set up, with translation, scaling etc. What matrix(s) and/or vector(s) do I need to multiply/add with my existing code to rotate an object.

Preferably around a point given by a vector2fa, also only in degrees because quaternions aren't implemented and its only 2D not 3D.

gl_Position = transformation * vec4(position, 1.0) + translation


Where transformation is done in java as (Note not actual code as * is replaced with .mul()):

Matrix4f transformation = ortho * scale


And translation is given by a method:

Vector4f translation = new Vector4f(x , y , 0f, 0f).mul(gc.getOrtho());


All the code listed before works as expected. It is just lacking the rotation feature mentioned at the top.

How can I add rotation to my code?

If you use JOML with LWJGL3 then you can use the Matrix3x2f class to do 2D transformations, like so:

Matrix3x2f transformation = new Matrix3x2f()
.view(-10, +10, -10, +10) // <- like ortho2D in Matrix4f
.translate(x, y)  // <- multiply translation

gl_Position = transformation * vec4(position, 0.0, 1.0)