flyctl: 0.3.209 -> 0.4.15 (#473544)
This commit is contained in:
@@ -7,22 +7,26 @@
|
||||
flyctl,
|
||||
installShellFiles,
|
||||
git,
|
||||
rake,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "flyctl";
|
||||
version = "0.3.209";
|
||||
version = "0.4.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "superfly";
|
||||
repo = "flyctl";
|
||||
rev = "v${version}";
|
||||
leaveDotGit = true;
|
||||
hash = "sha256-hzKKCwGTaz1MFQ1+F9piNBnaEDZJwJqoerR1c/uzSsQ=";
|
||||
postCheckout = ''
|
||||
cd "$out"
|
||||
git rev-parse HEAD > COMMIT
|
||||
'';
|
||||
hash = "sha256-2xl4dAP+9kTPkhFfXLNw00krB7zC10em1vAULTBKqvQ=";
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-ezGA1LGwQVFMzV/Ogj26pooD06O7FNTXMrYWkv6AwWM=";
|
||||
vendorHash = "sha256-xVRLH1H7HhxaR9L+N+qE4kwqjMyie+JjeXpXvwRKa5A=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
@@ -39,15 +43,20 @@ buildGoModule rec {
|
||||
git
|
||||
];
|
||||
|
||||
patches = [ ./disable-auto-update.patch ];
|
||||
patches = [
|
||||
./disable-auto-update.patch
|
||||
./set-commit.patch
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
# Embed VCS Infos
|
||||
export GOFLAGS="$GOFLAGS -buildvcs=true"
|
||||
|
||||
export GOFLAGS="$GOFLAGS -buildvcs=false"
|
||||
substituteInPlace internal/buildinfo/buildinfo.go \
|
||||
--replace '@commit@' "$(cat COMMIT)"
|
||||
GOOS= GOARCH= CGO_ENABLED=0 go generate ./...
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ rake ];
|
||||
|
||||
preCheck = ''
|
||||
HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/internal/buildinfo/buildinfo.go
|
||||
+++ b/internal/buildinfo/buildinfo.go
|
||||
@@ -117,6 +117,7 @@ func UserAgent() string {
|
||||
}
|
||||
|
||||
func Commit() string {
|
||||
+ return "@commit@"
|
||||
info, _ := debug.ReadBuildInfo()
|
||||
var rev = "<none>"
|
||||
var dirty = ""
|
||||
Reference in New Issue
Block a user