Commit 0be31071 authored by Alexis Williams's avatar Alexis Williams
Browse files

pgx_ulid 0.2.0 -> 0.2.1

Update pgx_ulid and add support for PostgreSQL 18.
parent 3f65ac08
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
{
  buildPgrxExtension,
  cargo-pgrx_0_12_6,
  cargo-pgrx_0_16_0,
  fetchFromGitHub,
  lib,
  nix-update-script,
@@ -9,19 +9,19 @@
}:
buildPgrxExtension (finalAttrs: {
  inherit postgresql;
  cargo-pgrx = cargo-pgrx_0_12_6;
  cargo-pgrx = cargo-pgrx_0_16_0;

  pname = "pgx_ulid";
  version = "0.2.0";
  version = "0.2.1";

  src = fetchFromGitHub {
    owner = "pksunkara";
    repo = "pgx_ulid";
    tag = "v${finalAttrs.version}";
    hash = "sha256-VdLWwkUA0sVs5Z/Lyf5oTRhcHVzPmhgnYQhIM8MWJ0c=";
    hash = "sha256-yjPTCJTeT1HQt8huDHBHs0DAHpmseMHeSaQhpPV6qdo=";
  };

  cargoHash = "sha256-OyrfwLMHn2aihfijHxE5oaz+XQC1HFlYbTp8Sw8RcK0=";
  cargoHash = "sha256-LRfn/TO/bBEvvzY9m6C8Lb0qdUStQD3oAzjDovS6H1s=";

  postInstall = ''
    # Upstream renames the extension when packaging
@@ -40,19 +40,14 @@ buildPgrxExtension (finalAttrs: {

  meta = {
    # Support for PostgreSQL 13 was removed in 0.2.0: https://github.com/pksunkara/pgx_ulid/blob/084778c3e2af08d16ec5ec3ef4e8f345ba0daa33/CHANGELOG.md?plain=1#L6
    broken =
      lib.versionOlder postgresql.version "14"
      ||
        # PostgreSQL 18 support issue upstream: https://github.com/pksunkara/pgx_ulid/issues/65
        # Note: already fixed on `master` branch.
        # Check after next package update.
        lib.warnIf (finalAttrs.version != "0.2.0") "Is postgresql18Packages.pgx_ulid still broken?" (
          lib.versionAtLeast postgresql.version "18"
        );
    broken = lib.versionOlder postgresql.version "14";
    description = "ULID Postgres extension written in Rust";
    homepage = "https://github.com/pksunkara/pgx_ulid";
    changelog = "https://github.com/pksunkara/pgx_ulid/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ myypo ];
    maintainers = with lib.maintainers; [
      myypo
      typedrat
    ];
  };
})