From 6990fc24610518228085690239fee791c955f22f Mon Sep 17 00:00:00 2001 From: Utkarash Singh Date: Thu, 29 Oct 2026 12:25:58 +0000 Subject: [PATCH] fix: keep the plain xpg name for multi-version builds The binary split named every build after its default version, so the all-versions build became xpg17 and consumers calling xpg broke. Only a build pinned to a single version takes the version suffix; a build that selects the version with -v keeps the name xpg. The default flake app now points at the all-versions build. --- .github/workflows/ci.yml | 2 +- flake.nix | 2 +- nix/xpg.nix | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43bf43e..eece59f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: run: | nix-build tests cd examples/hello - ../../result/bin/xpg17 psql -v ON_ERROR_STOP=1 -c "CREATE EXTENSION plpgsql_check;" + ../../result/bin/xpg psql -v ON_ERROR_STOP=1 -c "CREATE EXTENSION plpgsql_check;" build-on-macos: runs-on: blacksmith-6vcpu-macos-15 diff --git a/flake.nix b/flake.nix index b0d1db0..3c62a21 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ }; in { - default = mkApp "xpg" xpgPkgs.xpg17; + default = mkApp "xpg" xpgPkgs.xpg; xpg12 = mkApp "xpg12" xpgPkgs.xpg12; xpg13 = mkApp "xpg13" xpgPkgs.xpg13; diff --git a/nix/xpg.nix b/nix/xpg.nix index fd0b131..aff8f4f 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -76,7 +76,9 @@ let xpg = checked-shell-script { - name = "xpg${defaultVersion}"; + # a build pinned to one version is named after it (xpg17); a build that + # selects the version with -v keeps the plain name consumers call + name = if builtins.length versions == 1 then "xpg${defaultVersion}" else "xpg"; docs = "Develop native PostgreSQL extensions"; args = [ "ARG_POSITIONAL_SINGLE([operation], [Operation])"