Maybe someone else will have a better answer but in similar situations I’ve seen the derivation simply downloads a compiled release directly.
I ran into the same issue trying to package silverbullet which uses deno and I gave up, later I saw it was added to nixpkgs by just downloading the github release.
100%. Took me a good year to learn it well enough to be confident with what I was doing but I’ve now got it on everything with a single flake for all my hosts. I love that my user profile is configured the same everywhere. I can add a new tool or config or alias or whatever and it’s the same on every computer.
I’ve now written a module to define all the services I self host and from that it generates both nginx config and DNS config on different hosts.
The main advantage for me though is I only have to solve problems once. Once it’s there in the config I’m confident it’s solved and I won’t need to worry about it again. My previous server was 10 years old and there was stuff configured I’d long forgotten about how it worked or even why I did it.