Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.6 KiB
Nix
66 lines
1.6 KiB
Nix
{
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "egctl";
|
|
version = "1.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "envoyproxy";
|
|
repo = "gateway";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-glOnAnNuefdTq4BOd1NKpsadrWEqVOOc18jPx7lEwEQ=";
|
|
};
|
|
|
|
vendorHash = "sha256-SNXnEutsDQwoGKiJN3uXxVrCl4gFcd62ZuX8GPyGliI=";
|
|
# Fix case-insensitive conflicts producing platform-dependent checksums
|
|
# https://github.com/microsoft/go-mssqldb/issues/234
|
|
proxyVendor = true;
|
|
|
|
subPackages = [
|
|
"cmd/egctl"
|
|
"internal/cmd/egctl"
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/envoyproxy/gateway/internal/cmd/version.envoyGatewayVersion=v${finalAttrs.version}"
|
|
];
|
|
|
|
env.CGO_ENABLED = 0;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
$out/bin/egctl completion bash >egctl.bash
|
|
$out/bin/egctl completion fish >egctl.fish
|
|
$out/bin/egctl completion zsh >egctl.zsh
|
|
installShellCompletion egctl.{bash,fish,zsh}
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "egctl version --remote=false";
|
|
version = "v${finalAttrs.version}";
|
|
};
|
|
};
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
description = "Command-line utility for operating Envoy Gateway";
|
|
homepage = "https://gateway.envoyproxy.io";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ lib.maintainers.maxbrunet ];
|
|
mainProgram = "egctl";
|
|
};
|
|
})
|