Hey there Mr. Tildesley,
My patch also fixes this issue, but without appending things to PYTHONPATH. And it works just the same.
Since you say, sir, that you copied the wrap-phase from Anki to fix the issue, and I manually poked around with things, grepping the output of `env` and stuff to deal with it - I wonder if I have stumbled upon the bare minimum changes necessary to resolve this issue.
I would like to request that you, and other esteemed contributors, test my patch. And, if it seems good to you, I would like to request that you incorporate my patch in this change set.
Attached are the wrappers for `ebook-viewer`: with your patch applied, and with my patch applied, for anyone to compare.
Please do let me know if there are any insufficiencies in my solution, or if it does not work for anybody else (I did use --pure option with `guix environment`).