Commit Graph

60 Commits

Author SHA1 Message Date
isakgb
7ad52aa20e cargo-pgrx_0_12_6: drop 2026-06-21 13:23:43 +02:00
R. Ryantm
57c5a92067 cargo-pgrx: 0.18.0 -> 0.18.1 2026-05-31 21:11:40 +00:00
Luc Perkins
9995284044 postgresqlPackages.pg_search: 0.23.0 -> 0.23.4 2026-05-29 23:45:02 -07:00
Erlend Hamberg
3ed3a6889f cargo-pgrx: 0.17.0 -> 0.18.0 2026-05-19 13:47:39 +02:00
Stefan Frijters
0402e4f3b4 buildPgrxExtension: move env variables into env for structuredAttrs 2026-03-23 12:29:37 +01:00
Diogo Correia
c625d73255 cargo-pgrx_0_12_0_alpha_1: drop 2026-03-14 00:54:22 +00:00
Diogo Correia
224f3a2694 cargo-pgrx_0_17_0: init 2026-03-11 13:57:36 +00:00
R. Ryantm
b626d1c592 cargo-pgrx: 0.16.1 -> 0.17.0 2026-02-17 03:08:34 +00:00
Diogo Correia
62c23ac5db cargo-pgrx_0_16_1: init 2025-11-05 01:01:45 +00:00
Diogo Correia
69d8010a1f cargo-pgrx_0_14_1: drop
No longer used in nixpkgs since #436031.
2025-10-16 10:11:16 +01:00
R. Ryantm
f8022ce68e cargo-pgrx: 0.16.0 -> 0.16.1 2025-09-25 20:46:03 +00:00
Wolfgang Walther
415e523ebe cargo-pgrx_0_16_0: init
Needed for postgresql.pkgs.anonymizer.
2025-09-24 13:45:02 +02:00
R. Ryantm
ef522442c5 cargo-pgrx: 0.15.0 -> 0.16.0 2025-08-01 20:53:14 +00:00
Wolfgang Walther
68f8de6113 cargo-pgrx: prevent update of pinned versions
Hopefully it works this time.
2025-07-19 15:00:49 +02:00
Wolfgang Walther
86efb7f659 cargo-pgrx: modernize 2025-07-07 10:22:59 +02:00
Wolfgang Walther
4a373d13c5 cargo-pgrx_0_12_5: drop
Unused in nixpkgs right now.
2025-07-07 10:22:58 +02:00
Wolfgang Walther
4356ab5366 cargo-pgrx: 0.14.1 -> 0.15.0
Now handling the default cargo-pgrx attribute independently from pinned
versions to allow auto-update without breaking things.
2025-07-07 10:05:57 +02:00
Wolfgang Walther
8ea2c88439 buildPgrxExtension: require pinning cargo-pgrx
Each extension always depends on a specific cargo-pgrx version, so make
pinning a requirement.
2025-07-07 10:03:22 +02:00
Diogo Correia
136519ba0a cargo-pgrx_0_14_1: init; cargo-pgrx: 0.12.6 -> 0.14.1 2025-06-26 18:41:06 +01:00
Ihar Hrachyshka
dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00
Vladimír Čunát
a61952af35 staging-next 2025-04-03 (#395862) 2025-04-13 16:07:22 +02:00
Diogo Correia
a628ad3c79 buildPgrxExtension: add missing doc of usePgTestCheckFeature and fix typo 2025-04-13 12:41:48 +01:00
Diogo Correia
3a0d4ae3a5 buildPgrxExtension: restructure with lib.extendMkDerivation
Support fixed-point arguments with lib.extendMkDerivation
2025-04-13 12:41:41 +01:00
K900
a6d5666400 Merge remote-tracking branch 'origin/staging-next' into staging 2025-04-01 08:39:50 +03:00
Maximilian Bosch
806f02ed2f Merge: postgresqlPackages.pgvectorscale: init at 0.7.0, buildPgrxExtension: support cargo workspaces (#393689) 2025-03-31 16:54:47 +02:00
nixpkgs-ci[bot]
3ed34914ea Merge staging-next into staging 2025-03-28 00:15:57 +00:00
Wolfgang Walther
6c13b31afd buildPgrxExtension: mark packages as broken on darwin
Because of [1], we can't run initdb / postgres inside the darwin
sandbox, even though it succeeds most of the time. It will lead to hard
to debug build failures eventually.

Since pgrx runs initdb as part of the build... there seems to be no
other way than marking those packages as broken for now. This could be
relaxed once [2] is available, because we could then disable the
checkPhase and all "initdb" for pgrx on darwin.

[1]:
https://github.com/NixOS/nixpkgs/issues/371242#issuecomment-2672697582
[2]: https://github.com/pgcentralfoundation/pgrx/pull/1994
2025-03-27 20:56:56 +01:00
Maximilian Bosch
b9f0161238 buildPgrxExtension: enable building workspaces
Doing

    cargoBuildFlags = [ "-p" "foo" ]

doesn't work here since this gets only passed to PGRX_BUILD_FLAGS which
in turn is used by `cargo build`.

This means that pgrx itself doesn't know of the workspace setup and
fails with

    Error:
    0: Couldn't get manifest path
    1: `pgrx` requires a root package in a workspace when `--package` is not specified.

This patch introduces another flag called `cargoPgrxFlags` to do the
right thing, i.e. to pass this to each pgrx invocation.

Using `cargoBuildFlags` is not reasonable here since `cargo build`
accepts flags that may not be valid when invoking `cargo pgrx` (e.g. `-r`).
2025-03-26 14:44:33 +01:00
Wolfgang Walther
88dfade94b postgresql: replace pg_config with custom script
By replacing upstream's pg_config binary with a shell script, we:
- gain the ability to run pg_config easily when cross-compiling,
- can remove the fake pg_config in the default output,
- can remove the pg_config wrapper script dealing with special cases.

Some 20 years ago, pg_config *was* a shell script upstream, too. It was
changed to a binary, when it was made "relocatable", so it would return
paths depending on the location of the "postgres" binary. However, this
is exactly the thing that just hurts us in nixpkgs - we don't want those
paths to change, we want them to always point at the right outputs. By
writing the script ourselves, this becomes a lot less painful.

This approach means more lines of codes, but all of them are dead simple
and we have a lot less complexity overall.

Additionally, pg_config is now made a separate derivation, only exposed
as "postgresql.pg_config". This has the nice side-effect, that all users
of postgresql and libpq in nixpkgs must be very *explicit* about their
dependency on pg_config. This gives a lot more visibility into the state
of affairs regarding pkg-config support for libpq, which ultimately is
the much better solution.
2025-03-21 18:05:38 +01:00
Alyssa Ross
feb6df150f cargo-pgrx: useFetchCargoVendor
Cargo 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.
2025-01-26 20:35:52 +01:00
Matthias Beyer
108a4ac006 cargo-pgrx: Add matthiasbeyer as maintainer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-01-03 13:53:26 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
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
2024-12-10 20:26:33 +01:00
Wolfgang Walther
62b175ed21 postgresqlPackages.{pgvecto-rs,timescaledb_toolkit}: fix build on darwin
cargo-pgrx runs a temporary PostgreSQL cluster when building. This needs
to run with unix sockets only, otherwise it breaks in the darwin
sandbox.
2024-11-23 18:02:41 +01:00
Robert Schütz
adaa460a69 Revert "cargo-pgrx_0_12_0_alpha_1: remove"
This reverts commit b468a08276.
2024-11-23 08:40:12 -08:00
Diogo Correia
b468a08276 cargo-pgrx_0_12_0_alpha_1: remove
Used previously for pgvecto-rs 0.3.0, which has now been upgraded to
0.4.0, thus this is no longer needed.
2024-11-23 09:57:09 +00:00
Diogo Correia
dc1e6a5f3e cargo-pgrx: run nixfmt 2024-11-23 09:57:05 +00:00
Diogo Correia
c8610bba9f cargo-pgrx_0_12_5: init
Additionally, fix broken darwin build for all versions above 0.12.0.
2024-11-23 09:56:24 +00:00
Wolfgang Walther
3903e1897a cargo-pgrx_0_11_3: remove
Unused in nixpkgs.
2024-11-20 22:27:53 +01:00
Wolfgang Walther
7faa64b0aa cargo-pgrx_0_11_2: remove
Unused in nixpkgs.
2024-11-20 22:27:53 +01:00
Wolfgang Walther
c8de5e8d85 cargo-pgrx_0_10_2: remove
Unused in nixpkgs.
2024-11-20 22:27:53 +01:00
Kirill Radzikhovskyy
07ba29fead cargo-pgrx_0_12_6: init at 0_12_6 2024-11-21 06:32:48 +11:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Yt
2232cae406 postgresqlPackages.pgvecto-rs: 0.2.1 -> 0.3.0 (#321617) 2024-09-24 05:56:28 -04:00
Wolfgang Walther
050689db30 treewide: fix pg_config / postgresql headers moved to dev output
This was supposed to happen in #294504, but the commit was accidentally
left out when splitting off some libpq-related changes. Originated in
#179962, by Sandro.

Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2024-08-24 15:44:10 +02:00
Wolfgang Walther
5547322a0c postgresql: move dynamic modules to default output
Dynamic modules are technically libraries, but are not used by other packages.
Instead they are loaded by PostgreSQL itself, e.g. as extensions. Those just
increased the size of the lib output without benefit.

This removes the NIX_PGLIBDIR hack introduced in #17838 and instead makes sure
that pg_config always returns the correct PGLIBDIR. The test for postgis
introduced in the same PR is still passing with the change.
2024-08-23 21:37:43 +02:00
Diogo Correia
21a874802e buildPgrxExtension: avoid empty RUSTFLAGS
Setting RUSTFLAGS to an empty strings causes the linux pgvecto-rs
build to fail. Therefore, it should only be set when it is non-empty.

Build failure introduced by commit 2a13929e1f
2024-08-12 12:22:57 +01:00
Matthew Bauer
2a13929e1f postgresqlPackages.timescaledb_toolkit: fix on macos (#332353)
* postgresqlPackages.timescaledb_toolkit: fix on macos

It looks like the macOS linker doesn’t like that some of the symbols
are undefined in the extension. They will be provided by the postgres
binary, but macOS linker checks that all symbols are defined.
Apparently, Linux allows these symbols to be undefined.

The -undefined flag changes this behavior:

> Specifies how undefined symbols are to be treated. Options are:
> error, warning, suppress, or dynamic_lookup. The default is error.

So, setting to dynamic_lookup makes the most sense here, and makes
this package work on macOS. I tried to see if pgvecto-rs, which also
uses buildPgrxExtension, would build. Unfortunately, it gave other
errors.

More information on the bug here: https://github.com/supabase/nix-postgres/issues/10

* Remove stdenv
2024-08-06 10:17:48 -05:00
Diogo Correia
da5ae1bd60 postgresqlPackages.pgvecto-rs: 0.2.1 -> 0.3.0 2024-07-30 01:23:15 +01:00
Scott Dier
a13e0070ff cargo-pgrx: Call cargo pgrx instead of cargo-pgrx.
The new version check in pgrx 0.11.3 depends on the 'CARGO' environment
variable which is not set unless 'cargo pgrx' is called.
2024-05-25 16:21:27 +02:00
Mario Rodas
22ba1a22d7 cargo-pgrx: expose more versions 2024-03-15 04:20:00 +00:00