-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Describe the bug
bin-wrapper is a library to abstract downloading and calling binaries from Nodejs. A bunch of apparently popular wrapper-libaries (around cwebp, pngquant, …) are using this. The culprit with this approach is that they do not support distribution or OS provided binaries. They always try to download the latest binary from github, unless one does exist in their package directory.
To Reproduce
Create a new nodejs project and add cwebp-bin as dependency. Try building the shell using npmlock2nix.shell on the newly created project.
Expected behavior
It should be sufficient to pass cwebp (from pkgs.libwebp) into the build- or nativeBuildInputs. There shouldn't be any network access happening within the nix build.
Additional context
There is an upstream PR that has gone stale some time ago. Unless that PR progresses or there is another approach to this we will have to consider this as a blocker for all packages using bin-wrapper. Alternatively we could spawn another webserver and abuse (the hopefully configurable) proxy configuration to redirect requests to it. I'd rather have a proper solution tho…