Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin support for postgres extensions #2088

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lagoja
Copy link
Contributor

@Lagoja Lagoja commented May 27, 2024

Summary

This PR makes it possible to install Postgres Extensions with Devbox. This didn't work with previous versions of Devbox + the Postgres plugin because:

  1. Postgres was only looking for extensions within a subdirectory of the Postgres package in the Nix Store. Unless we install the extensions using the
  2. The default PostgreSQL output out doesn't include libraries used to install some extensions.

Fortunately, the Nix PostgreSQL package is patched so that you can set the pkglibdir at runtime using the NIX_PGLIBDIR environment variable. If we set this variable to $DEVBOX_PACKAGES_DIR/lib, and if the user installs the lib output, extensions should work as expected.

This PR sets the NIX_PGLIBDIR variable in the plugin, and adds documentation + modifies the example to highlight how to install postgres with the lib output.

How was it tested?

Tested on our Postgres example with the PostGIS extension.

@Lagoja Lagoja marked this pull request as ready for review May 27, 2024 18:08
@Lagoja Lagoja marked this pull request as draft May 27, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant