Skip to content

Commit 3bdfc66

Browse files
committed
major version on pkg name to avoid collision can alias on install
1 parent b63b574 commit 3bdfc66

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ansible/tasks/setup-wal-g.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
- name: Install wal-g 2 from nix binary cache
2525
become: yes
2626
shell: |
27-
sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g"
27+
sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-2"
2828
when: stage2_nix
2929

3030
- name: Install wal-g 3 from nix binary cache
@@ -35,7 +35,7 @@
3535

3636
- name: Create symlink for wal-g from Nix profile to /usr/local/bin
3737
ansible.builtin.file:
38-
src: /home/wal-g/.nix-profile/bin/wal-g
38+
src: /home/wal-g/.nix-profile/bin/wal-g-2
3939
dest: /usr/local/bin/wal-g
4040
state: link
4141
force: yes # This will replace existing file/symlink if it exists

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
sfcgal = pkgs.callPackage ./nix/ext/sfcgal/sfcgal.nix { };
8888
supabase-groonga = pkgs.callPackage ./nix/supabase-groonga.nix { };
8989
mecab-naist-jdic = pkgs.callPackage ./nix/ext/mecab-naist-jdic/default.nix { };
90-
inherit (pkgs.callPackage ./nix/wal-g.nix { }) wal-g wal-g-3;
90+
inherit (pkgs.callPackage ./nix/wal-g.nix { }) wal-g-2 wal-g-3;
9191
# Our list of PostgreSQL extensions which come from upstream Nixpkgs.
9292
# These are maintained upstream and can easily be used here just by
9393
# listing their name. Anytime the version of nixpkgs is upgraded, these
@@ -406,7 +406,7 @@
406406
# PostgreSQL versions.
407407
psql_15 = postgresVersions.psql_15;
408408
psql_orioledb-17 = postgresVersions.psql_orioledb-17;
409-
wal-g = wal-g;
409+
wal-g-2 = wal-g-2;
410410
wal-g-3 = wal-g-3;
411411
sfcgal = sfcgal;
412412
pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;

nix/wal-g.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
}:
99

1010
let
11-
walGCommon = { version, vendorHash, sha256 }:
11+
walGCommon = { version, vendorHash, sha256, majorVersion }:
1212
buildGoModule rec {
13-
pname = "wal-g";
13+
pname = "wal-g-${majorVersion}";
1414
inherit version;
1515

1616
src = fetchFromGitHub {
@@ -61,16 +61,18 @@ let
6161
in
6262
{
6363
# wal-g v2.0.1
64-
wal-g = walGCommon {
64+
wal-g-2 = walGCommon {
6565
version = "2.0.1";
6666
sha256 = "sha256-5mwA55aAHwEFabGZ6c3pi8NLcYofvoe4bb/cFj7NWok=";
6767
vendorHash = "sha256-BbQuY6r30AkxlCZjY8JizaOrqEBdv7rIQet9KQwYB/g=";
68+
majorVersion = "2";
6869
};
6970

7071
# wal-g v3.0.5
7172
wal-g-3 = walGCommon {
7273
version = "3.0.5";
7374
sha256 = "sha256-wVr0L2ZXMuEo6tc2ajNzPinVQ8ZVzNOSoaHZ4oFsA+U=";
7475
vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw=";
76+
majorVersion = "3";
7577
};
7678
}

0 commit comments

Comments
 (0)