devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Preinstall common libraries for popular environments

Open gcurtis opened this issue 1 year ago • 1 comments

Make the Python and Ruby plugins automatically install common shared libraries and/or add dev to the default outputs for select packages.

A bunch of issues pop up when installing gems or pip packages because common libraries are unavailable. For example, in devbox#1752 the user tried to install the mysql gem and it failed because libcrypto, libssl, and libzstd couldn’t be found. This happens more frequently in Nix because Nix wants packages to be explicit about their dependencies. Other operating systems tend to have OpenSSL preinstalled, and because all libraries go into /usr/lib, the compiler automatically finds them.

At the cost of some bloat and slightly longer install times, we could update the ruby and python plugins to automatically add packages for common libraries (TDB what those should be).

Related issues

  • https://github.com/jetpack-io/devbox/issues/1780

gcurtis avatar Feb 27 '24 20:02 gcurtis

It would be lovely if there was a built-in nix way of tracking which gems/pips need which libraries so that only the minimum required libraries were installed.

Does bundix do that for ruby? I haven't tried it yet, but it seems like nix has something for managing existing gemfiles via bundix. It would be nice if devbox's rails template had an example of using bundix or if it was somehow built-in.

foucist avatar Sep 27 '24 17:09 foucist