How to rotate an object around a fixed point so it follows the mouse cursor?

I want to rotate the purple rectangle around the red square in reference to the center of the square. In addition I want to be able to have the rectangle follow the mouse cursor wherever it goes. Here is a picture for demonstration:

Here is the code I have already written:

void FixedUpdate(){
		transform.RotateAround(new Vector3(0.0f, 1.25f, -12.5f), Vector3.up, Vector3.Angle(new Vector3(1f,1f,0f),new Vector3(Input.mousePosition.x,Input.mousePosition.y, 0f)));
	}

This code doesn’t work and just rotates the rectangle around the square at a fixed pace with no noticeable influence from the mouse. Thank you for your help.

Here is one solution. If the center object does not move, you can move the calculation of ‘centerScreenPos’ to Start().

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour {    

	public Transform center;
	private Vector3 v;


	void Start() {
		// Requires the block to be directly to the right of the center
		//   with rotation set correctly on start
		v = (transform.position - center.position);
	}
	
	void Update(){
		Vector3 centerScreenPos = Camera.main.WorldToScreenPoint (center.position);
		Vector3 dir = Input.mousePosition - centerScreenPos;
		float angle = Mathf.Atan2 (dir.y, dir.x) * Mathf.Rad2Deg;
		Quaternion q = Quaternion.AngleAxis (angle, Vector3.forward);
		transform.position = center.position + q * v;
		transform.rotation = q;
	}
}