Perl is available in nativeBuildInputs, but the perl used at runtime,
must be a different one. Thus, we need to explicitly tell configure
about it, similar to how we did with python.
This is for consistency with postgresqlTestExtension and
postgresqlTestHook. Everything that is passed via postgresql's
generic.nix "packages scope" now is prefixed with "postgresql".
- Fix dependencies (uuid and locale)
- Add the --export-dynamic flag - it is applicable for all
autotools-based cross configurations starting with v16.
This allows us to fetch newer releases a few days before they are
officially released and the tarballs have been pushed.
The regular release cycle is like this:
- Sunday, the release notes are committed.
- Monday, the version is "stamped", i.e. the version bump committed.
- Thursday, the release is made.
There are not going to be any changes from Monday on, so we can kick off
our builds at that time already - they still need time to hit unstable
anyway.
The recent tzdata update to 2025a broke postgres' test suite. Until the
next minor releases come out, we'll apply upstream's commit to fix this
as a patch.
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.
Since 445371f309
(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-PYTHONCloses#372333
Building postgresql_14 currently fails with this on master:
error: derivation contains an illegal reference specifier 'man'
The reason seems to be a bug in nix, where outputChecks are run
improperly when one of the outputs can already be substituted. Why the
man output can be substituted from hydra is unknown, but adding more
outputChecks for the the man and doc outputs should work around the
problem until nix is fixed.
It doesn't matter whether the hostPlatform could execute stuff from the
buildPlatform - we need it the other way around: Certain things during a
build process can only happen when, as part of the build, the
**buildPlatform** can execute the code it just created for the
**hostPlatform**.
Unless we are talking about compilation at run-time, as in the case of
PostgreSQL. Extend the comment there to make it clear that this is on
purpose. Another case that's OK is vlc, where luac can't cross-compile
at build time, thus the bytecode is actually build for the buildPlatform
and the sources must be interpreted at runtime instead.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
The underlying problem was fixed as a side-effect of [1], for reasons
unknown to me. In the current state, it's enough to disable a few
breaking dependencies to make the build pass.
Note, that this builds the full package, including backend. However, the
backend is not working, yet: Loading shared modules, which PostgreSQL
heavily depends is still broken. Further, all binaries in the default
output, even client binaries such as psql, are currently dynamically
linked against libpq.so. While the current autoconf based build system
doesn't support changing this, this might be possible in the future with
meson.
However, not all is bad: Fixing the build allows using the static
libpq.a library, which is probably the one thing that most users want
from pkgsStatic.postgresql anyway.
Resolves#191920
[1]: 77977286d8
This replaces `writeShellApplication` with `writeShellScriptBin` that
doesn't perform a shellcheck. This makes it way easier to build
postgresql on staging since GHC is super slow to build, even with pretty
powerful machines.
Also Haskell updates are currently merged straight into master which
means that postgresql and all reverse dependencies require a rebuild on
master then[1].
[1] https://github.com/NixOS/nixpkgs/pull/354270#issuecomment-2463196665
(cherry picked from commit 4cd083a3cd)
(cherry picked from commit a40d887561d5f4a6d330181891d78174f82e84e4)
This was added for non-structuredAttrs output checks in #211783. Here we
extend the same concept to structuredAttrs-enabled outputChecks, too.
The postgresql package worked around this with some conditionals. Those
can now be removed - without causing LLVM to be built or substituted.
The darwin specific Makefile contains a reference to the postgres
binary. Some extensions are able to set bindir to their own output
correctly for installation and will then fail to find the postgres
binaryin their own output during linking.
PostGIS worked around this by faking a postgres binary in their own
output, but we can do better by hardcoding the proper path in the
Makefile when PostgreSQL is built.
The tests were disabled in #62752. The problem is System Integrity
Protection on macOS, which resets DYDL_LIBRARY_PATH and thus breaks the
temporary installation of PostgreSQL. By running the checks *after* the
installPhase, the libraries will already be available in the default
locations.