From 83bbb703c3e55f602808a49454dff66c4eb015e9 Mon Sep 17 00:00:00 2001 From: Ali Tavallaie Date: Wed, 6 May 2026 16:13:35 +0400 Subject: [PATCH 1/2] update pgmq update --- nix/ext/pgmq/default.nix | 26 ++++++++---------------- nix/ext/versions.json | 43 ++++++++++++++++++++++++---------------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/nix/ext/pgmq/default.nix b/nix/ext/pgmq/default.nix index 42613b6acd..2b53d9343d 100644 --- a/nix/ext/pgmq/default.nix +++ b/nix/ext/pgmq/default.nix @@ -36,12 +36,14 @@ let inherit pname version; buildInputs = [ postgresql ]; src = fetchFromGitHub { - owner = "tembo-io"; + owner = "pgmq"; repo = pname; rev = "v${version}"; inherit hash; }; + # Only apply patches to versions that still need them + # Check if the drop_queue patch is still needed for your versions patches = lib.optionals (version == latestVersion) [ ./0001-fix-replace-drop_queue-function-if-exists.patch ]; @@ -63,25 +65,14 @@ let -e "s|^module_pathname = .*|module_pathname = '\$libdir/${pname}'|" \ ${pname}.control > $out/share/postgresql/extension/${pname}--${version}.control - # For the latest version, create default control file and symlink and copy SQL upgrade scripts + # For the latest version, create default control file and copy SQL upgrade scripts if [[ "${version}" == "${latestVersion}" ]]; then { echo "default_version = '${version}'" cat $out/share/postgresql/extension/${pname}--${version}.control } > $out/share/postgresql/extension/${pname}.control - cat >> sql/pgmq--1.5.0--1.5.1.sql < $out/share/postgresql/extension/${pname}--${version}.control - # For the latest version, create default control file and copy SQL upgrade scripts + # For the latest version, create default control file and symlink + copy upgrade scripts if [[ "${version}" == "${latestVersion}" ]]; then { echo "default_version = '${version}'" cat $out/share/postgresql/extension/${pname}--${version}.control } > $out/share/postgresql/extension/${pname}.control - # Copy all SQL upgrade scripts cp sql/*.sql $out/share/postgresql/extension fi @@ -81,7 +79,8 @@ let meta = with lib; { description = "A lightweight message queue. Like AWS SQS and RSMQ but on Postgres."; - homepage = "https://pgmq.github.io/pgmq/"; + homepage = "https://github.com/pgmq/pgmq"; + maintainers = with maintainers; [ olirice ]; inherit (postgresql.meta) platforms; license = licenses.postgresql; };