File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed
Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 3636- name : Create symlink for wal-g from Nix profile to /usr/local/bin
3737 ansible.builtin.file :
3838 src : /home/wal-g/.nix-profile/bin/wal-g-2
39- dest : /usr/local/bin/wal-g
39+ dest : /usr/local/bin/wal-g-v2
4040 state : link
4141 force : yes # This will replace existing file/symlink if it exists
4242 become : yes # Need sudo to write to /usr/local/bin
5151 become : yes # Need sudo to write to /usr/local/bin
5252 when : stage2_nix
5353
54+ - name : Create symlink to make wal-g-v3 the default wal-g
55+ ansible.builtin.file :
56+ src : /usr/local/bin/wal-g-v3
57+ dest : /usr/local/bin/wal-g
58+ state : link
59+ force : yes
60+ become : yes
61+ when : stage2_nix
62+
5463- name : Create /etc/wal-g/config.json
5564 file :
5665 path : /etc/wal-g/config.json
Original file line number Diff line number Diff line change 4444 ] ;
4545
4646 postInstall = ''
47- mv $out/bin/pg $out/bin/wal-g
48- installShellCompletion --cmd wal-g \
49- --bash <($out/bin/wal-g completion bash) \
50- --zsh <($out/bin/wal-g completion zsh)
47+ mv $out/bin/pg $out/bin/wal-g-${ majorVersion }
48+
49+ # Create version-specific completions
50+ mkdir -p $out/share/bash-completion/completions
51+ $out/bin/wal-g-${ majorVersion } completion bash > $out/share/bash-completion/completions/wal-g-${ majorVersion }
52+
53+ mkdir -p $out/share/zsh/site-functions
54+ $out/bin/wal-g-${ majorVersion } completion zsh > $out/share/zsh/site-functions/_wal-g-${ majorVersion }
55+
5156 '' ;
5257
5358 meta = with lib ; {
5459 homepage = "https://github.com/wal-g/wal-g" ;
5560 license = licenses . asl20 ;
5661 description = "Archival restoration tool for PostgreSQL" ;
57- mainProgram = "wal-g" ;
62+ mainProgram = "wal-g- ${ majorVersion } " ;
5863 maintainers = [ samrose ] ;
5964 } ;
6065 } ;
7580 vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw=" ;
7681 majorVersion = "3" ;
7782 } ;
78- }
83+ }
You can’t perform that action at this time.
0 commit comments