Skip to content

Packages using bin-wrapper will not find their binaries #24

@andir

Description

@andir

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…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions