-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220785 from techknowlogick/svix-cli
svix-cli: init at 0.21.1
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ lib, fetchFromGitHub, fetchpatch, buildGoModule }: | ||
|
||
buildGoModule rec { | ||
version = "0.21.1"; | ||
pname = "svix-cli"; | ||
revision = "v${version}"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "svix"; | ||
repo = pname; | ||
rev = revision; | ||
hash = "sha256-bHcxhJs4Nu/hdiftQFZMx4M5iqFtpOzrsvXOgo9NlDc="; | ||
}; | ||
|
||
vendorHash = "sha256-qSzEpxktdAV+mHa+586mKvpclCpXR6sE7HNcPZywd4s="; | ||
|
||
# Increase minimum go version to 1.17 as the build fails with 1.16 | ||
# due to modules requiring code that was introduced in 1.17 | ||
# PR submitted upstream: https://github.com/svix/svix-cli/pull/103 | ||
patches = [ | ||
(fetchpatch { | ||
name = "increase-minimum-go.patch"; | ||
url = "https://github.com/svix/svix-cli/commit/3c6fc06f72bd7e43165c31019b206ebad175d758.patch"; | ||
hash = "sha256-OwiyBZ3IZGkvo6zEZY1+XYFrqT+RseqTJ5xwCl3LtVg="; | ||
}) | ||
]; | ||
|
||
subPackages = [ "." ]; | ||
|
||
ldflags = | ||
[ "-s" "-w" "-X github.com/svix/svix-cli/version.Version=v${version}" ]; | ||
|
||
meta = with lib; { | ||
description = "A CLI for interacting with the Svix API"; | ||
homepage = "https://github.com/svix/svix-cli/"; | ||
license = licenses.gpl3; | ||
maintainers = with maintainers; [ techknowlogick ]; | ||
}; | ||
} |