Need help creating Pika Backup snap (borgbackup issue)

I’ve been hacking together a snap for Pika Backup here: GitHub - thatLeaflet/pika-backup-snap: unofficial Picka Backup snap. It’s based on core24, but I have the same issue on core22 too.

I’m able to run the app, but I’m running into an issue with borgbackup, the backend that Pika Backup uses. In the log, I see

(pika-backup:415381): pika-backup-WARNING **: 18:08:41.929: src/ui/utils.rs:405:0: Displaying error:
  Failed to run “borg”. Is BorgBackup installed correctly?
  Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

I do have borgbackup in my stage-packages. When I run snap run --shell pika-backup and then borg, I get this back

Traceback (most recent call last):
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/snap/pika-backup/x12/usr/bin/borg", line 33, in <module>
    sys.exit(load_entry_point('borgbackup==1.2.8', 'console_scripts', 'borg')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/pika-backup/x12/usr/bin/borg", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for borgbackup