Here is how I installed nautilus-compare on 22.04:
Install direct from source is possible by doing the following:
Install the nautilus python3 bindings
sudo apt-get install python3-nautilus
Download the latest source
wget https://launchpad.net/~boamaod/+archive/ubuntu/nautilus-compare/+sourcefiles/nautilus-compare/1.0.0~focal1/nautilus-compare_1.0.0~focal1.tar.xz
tar -xvf nautilus-compare_1.0.0~focal1.tar.xz
Install the source files
cd nautilus-compare-1.0.0/src
sudo cp nautilus-compare.py /usr/share/nautilus-python/extensions/
sudo mkdir /usr/share/nautilus-compare
sudo cp utils.py /usr/share/nautilus-compare
sudo cp nautilus-compare-preferences.py /usr/share/nautilus-compare
Install any missing python3 modules
At this point, if the python source uses any modules you don't have installed, then you will need to install them too, for example using pip. I already had all the modules so didn't need to.
Then restart nautilus and the compare menu should now appear.
nautilus -q && nautilus &