Calling /usr/sbin/libgvc6-config-update -c during build


I’m trying to snap jenviz with a strict confinement. The problem I have when I use my build snap is:

$ jenviz --jenkins-url http://localhost:8080 --jenkins-user admin --jenkins-password xxx --job-ignore-disabled  my-job  --output-view
There is no layout engine support for "dot"
Perhaps "dot -c" needs to be run (with installer's privileges) to register the plugins?
Traceback (most recent call last):
  File "/snap/jenviz/x11/bin/jenviz", line 8, in <module>
  File "/snap/jenviz/x11/lib/python3.8/site-packages/jenviz/", line 114, in main
    graph.render(args.output_file, format=args.output_format, view=args.output_view)
  File "/snap/jenviz/x11/lib/python3.8/site-packages/graphviz/", line 238, in render
    rendered = backend.render(self._engine, format, filepath,
  File "/snap/jenviz/x11/lib/python3.8/site-packages/graphviz/", line 235, in render
    run(cmd, capture_output=True, cwd=cwd, check=True, quiet=quiet)
  File "/snap/jenviz/x11/lib/python3.8/site-packages/graphviz/", line 191, in run
    raise CalledProcessError(proc.returncode, cmd,
graphviz.backend.CalledProcessError: Command '['dot', '-Kdot', '-Tpdf', '-O', 'jenviz.out']' returned non-zero exit status 1. [stderr: b'There is no layout engine support for "dot"\nPerhaps "dot -c" needs to be run (with installer\'s privileges) to register the plugins?\n']

So I think I need to run:

/usr/sbin/libgvc6-config-update -c

from within the prime dir (I guess). How can I do that?
Something like this will fail:

    plugin: python
    source: .
      - python3-setuptools-scm
      # for python cryptography
      - libffi-dev
      - rustc
      - cargo
      - libssl-dev
      - graphviz
      - libgvc6
    override-prime: |
      snapcraftctl prime
      /usr/sbin/libgvc6-config-update -c


Staging jenviz 
+ snapcraftctl stage
Priming jenviz 
+ snapcraftctl prime
+ /usr/sbin/libgvc6-config-update -c
/bin/bash: line 35: /usr/sbin/libgvc6-config-update: No such file or directory
Failed to run 'override-prime': Exit code was 127.