-
-
Notifications
You must be signed in to change notification settings - Fork 205
Sam/wal g 2 and 3 #1485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Sam/wal g 2 and 3 #1485
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ef23d0d
feature: wal-g v 3 and v 2
samrose 5ecebe7
chore: install, symlink
samrose b49b77a
chore: bump versions to test wal-g
samrose 6306e28
chore: build wal-g in ci and copy to binary cache on success
samrose 2d9e729
chore: release wal-g 3
samrose 2631d14
chore: cover installing both versions of wal-g 2 and 3 2 as default
samrose b63b574
chore: add the "v" as requested
samrose 3bdfc66
major version on pkg name to avoid collision can alias on install
samrose 899c235
chore: cover in package build as well
samrose 0b6cdd7
chore: better support for both versions, symlink default to v3 on new…
samrose c36c182
chore: cleanup file
samrose 2761d73
chore: bump version for release
samrose ed3a4c3
chore: update dockerfiles
samrose 93a6cf8
chore: get aliases right
samrose 6f7b01f
chore: remove rendundant
samrose 7ce55bd
chore: testing suffix
samrose 73300c5
chore: bump for release
samrose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,83 @@ | ||
{ | ||
lib, | ||
buildGoModule, | ||
fetchFromGitHub, | ||
brotli, | ||
libsodium, | ||
installShellFiles, | ||
{ lib | ||
, buildGoModule | ||
, fetchFromGitHub | ||
, brotli | ||
, libsodium | ||
, installShellFiles | ||
, | ||
}: | ||
|
||
buildGoModule rec { | ||
pname = "wal-g"; | ||
version = "3.0.5"; | ||
let | ||
walGCommon = { version, vendorHash, sha256, majorVersion }: | ||
buildGoModule rec { | ||
pname = "wal-g-${majorVersion}"; | ||
inherit version; | ||
|
||
src = fetchFromGitHub { | ||
owner = "wal-g"; | ||
repo = "wal-g"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-wVr0L2ZXMuEo6tc2ajNzPinVQ8ZVzNOSoaHZ4oFsA+U="; | ||
src = fetchFromGitHub { | ||
owner = "wal-g"; | ||
repo = "wal-g"; | ||
rev = "v${version}"; | ||
inherit sha256; | ||
}; | ||
|
||
inherit vendorHash; | ||
|
||
nativeBuildInputs = [ installShellFiles ]; | ||
|
||
buildInputs = [ | ||
brotli | ||
libsodium | ||
]; | ||
|
||
subPackages = [ "main/pg" ]; | ||
|
||
tags = [ | ||
"brotli" | ||
"libsodium" | ||
]; | ||
|
||
ldflags = [ | ||
"-s" | ||
"-w" | ||
"-X github.com/wal-g/wal-g/cmd/pg.walgVersion=${version}" | ||
"-X github.com/wal-g/wal-g/cmd/pg.gitRevision=${src.rev}" | ||
]; | ||
|
||
postInstall = '' | ||
mv $out/bin/pg $out/bin/wal-g-${majorVersion} | ||
|
||
# Create version-specific completions | ||
mkdir -p $out/share/bash-completion/completions | ||
$out/bin/wal-g-${majorVersion} completion bash > $out/share/bash-completion/completions/wal-g-${majorVersion} | ||
|
||
mkdir -p $out/share/zsh/site-functions | ||
$out/bin/wal-g-${majorVersion} completion zsh > $out/share/zsh/site-functions/_wal-g-${majorVersion} | ||
|
||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/wal-g/wal-g"; | ||
license = licenses.asl20; | ||
description = "Archival restoration tool for PostgreSQL"; | ||
mainProgram = "wal-g-${majorVersion}"; | ||
maintainers = [ samrose ]; | ||
}; | ||
}; | ||
in | ||
{ | ||
# wal-g v2.0.1 | ||
wal-g-2 = walGCommon { | ||
version = "2.0.1"; | ||
sha256 = "sha256-5mwA55aAHwEFabGZ6c3pi8NLcYofvoe4bb/cFj7NWok="; | ||
vendorHash = "sha256-BbQuY6r30AkxlCZjY8JizaOrqEBdv7rIQet9KQwYB/g="; | ||
majorVersion = "2"; | ||
}; | ||
|
||
vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw="; | ||
|
||
nativeBuildInputs = [ installShellFiles ]; | ||
|
||
buildInputs = [ | ||
brotli | ||
libsodium | ||
]; | ||
|
||
subPackages = [ "main/pg" ]; | ||
|
||
tags = [ | ||
"brotli" | ||
"libsodium" | ||
]; | ||
|
||
ldflags = [ | ||
"-s" | ||
"-w" | ||
"-X github.com/wal-g/wal-g/cmd/pg.walgVersion=${version}" | ||
"-X github.com/wal-g/wal-g/cmd/pg.gitRevision=${src.rev}" | ||
]; | ||
|
||
postInstall = '' | ||
mv $out/bin/pg $out/bin/wal-g | ||
installShellCompletion --cmd wal-g \ | ||
--bash <($out/bin/wal-g completion bash) \ | ||
--zsh <($out/bin/wal-g completion zsh) | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/wal-g/wal-g"; | ||
license = licenses.asl20; | ||
description = "Archival restoration tool for PostgreSQL"; | ||
mainProgram = "wal-g"; | ||
maintainers = [ samrose ]; | ||
# wal-g v3.0.5 | ||
wal-g-3 = walGCommon { | ||
version = "3.0.5"; | ||
sha256 = "sha256-wVr0L2ZXMuEo6tc2ajNzPinVQ8ZVzNOSoaHZ4oFsA+U="; | ||
vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw="; | ||
majorVersion = "3"; | ||
}; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.