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

[Backport release-24.11] postgresql: fix build if pythonSupport is enabled #374807

Merged
merged 2 commits into from
Jan 19, 2025

Conversation

nixpkgs-ci[bot]
Copy link
Contributor

@nixpkgs-ci nixpkgs-ci bot commented Jan 18, 2025

Bot-based backport to release-24.11, triggered by a label in #372655.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-commiter, if you find that it is not acceptable, leave a comment.

Since 445371f
(which added `strictDeps = true;`) the build of PostgreSQL is broken if
python support is enabled (via argument `pythonSupport = true`). The
problem seems to be that PostgreSQL’s build system is unable to find
the supplied Python installation.

This commit fixes the build by setting the `PYTHON` environment variable
within the build environment, as document here:

https://www.postgresql.org/docs/current/install-make.html#CONFIGURE-ENVVARS-PYTHON

Closes #372333

(cherry picked from commit 6af0112)
Currently `PYTHONPATH` is not set when building PostgreSQL. This results
in Python modules not being available within `pl/python3u`.

This commit adds `PYTHONPATH` of the supplied `python3` via `wrapProgram`,
which is especially useful when supplying a custom Python env.

(cherry picked from commit b6773ad)
@wolfgangwalther wolfgangwalther force-pushed the backport-372655-to-release-24.11 branch from 917d233 to 9ed87a1 Compare January 19, 2025 14:10
@wolfgangwalther
Copy link
Contributor

Rebased to trigger eval again, which couldn't compare against the target branch.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 19, 2025
@wolfgangwalther wolfgangwalther merged commit a858e3a into release-24.11 Jan 19, 2025
25 of 29 checks passed
@wolfgangwalther wolfgangwalther deleted the backport-372655-to-release-24.11 branch January 19, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants