Packaging an electron app with VaapiVideoDecoder support

I have been trying to package GitHub - hmlendea/gfn-electron: Linux Desktop client for Nvidia's GeForce NOW game streaming service. But so far it has been a bit of a nightmare.

First I tried using buildNpmPackage. But I run into the problem that one of the dependencies (register-scheme) didn’t have a package-lock.json, and adding it to the package didn’t seem to be possible since last commit in its repository is in 2018. However, this package is an optional dependency, but since it is in the package lock of multiple sub packages (one of which is deprecated) it seems to be a nightmare to patch it. I tried using forceGitDeps, but then I also start to get errors about writing logs, which is fixable via makeCacheWritable. And then the error of scripts which can be turned off via --ingore-scripts, but at this point I thought scripts must have some important functionality. And due to lack package-lock.json this whole thing wouldn’t be even reproducible, and I gave up on this route.

Since it also had a AppImage in github releases, I tried using appimageTools.wrapType2. But then I have problems with getting egl to work Passthrough is not supported, GL is egl, ANGLE is. Which I think required by VaapiVideoDecoder, and is critical due to the fact that this is a cloud gaming client.
I looked at how it was done in chromium, I think it’s fixed by this. But repeating it with appimageTools.wrapType2 seems to be hard.

There is also a zip archive available in github releases. But it has a lot .so libraries included, and I am not quite sure how to repackage it to use nix libraries instead, and so far I can’t get it to launch.

So I am not sure which path to continue on, I can’t seem to find a similar electron with NPM package and with gl support.