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 36
36
- name : Create symlink for wal-g from Nix profile to /usr/local/bin
37
37
ansible.builtin.file :
38
38
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
40
40
state : link
41
41
force : yes # This will replace existing file/symlink if it exists
42
42
become : yes # Need sudo to write to /usr/local/bin
51
51
become : yes # Need sudo to write to /usr/local/bin
52
52
when : stage2_nix
53
53
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
+
54
63
- name : Create /etc/wal-g/config.json
55
64
file :
56
65
path : /etc/wal-g/config.json
Original file line number Diff line number Diff line change 44
44
] ;
45
45
46
46
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
+
51
56
'' ;
52
57
53
58
meta = with lib ; {
54
59
homepage = "https://github.com/wal-g/wal-g" ;
55
60
license = licenses . asl20 ;
56
61
description = "Archival restoration tool for PostgreSQL" ;
57
- mainProgram = "wal-g" ;
62
+ mainProgram = "wal-g- ${ majorVersion } " ;
58
63
maintainers = [ samrose ] ;
59
64
} ;
60
65
} ;
75
80
vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw=" ;
76
81
majorVersion = "3" ;
77
82
} ;
78
- }
83
+ }
You can’t perform that action at this time.
0 commit comments