mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 19:43:30 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "glooctl";
|
|
version = "1.17.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solo-io";
|
|
repo = "gloo";
|
|
rev = "v${version}";
|
|
hash = "sha256-7KkaQYTsamUapWKPB0JIoEnOs/SvrCbBgQqvQg9VQ9o=";
|
|
};
|
|
|
|
vendorHash = "sha256-rAObw4J0ATle1gq5Z1MsrGy/iqQDHjnMPAEIPBgtY3g=";
|
|
|
|
subPackages = [ "projects/gloo/cli/cmd" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
strictDeps = true;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-X github.com/solo-io/gloo/pkg/version.Version=${version}"
|
|
];
|
|
|
|
preCheck = ''
|
|
export HOME=$TMPDIR
|
|
'';
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cmd $out/bin/glooctl
|
|
installShellCompletion --cmd glooctl \
|
|
--bash <($out/bin/glooctl completion bash) \
|
|
--zsh <($out/bin/glooctl completion zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "Unified CLI for Gloo, the feature-rich, Kubernetes-native, next-generation API gateway built on Envoy";
|
|
mainProgram = "glooctl";
|
|
homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/";
|
|
changelog = "https://github.com/solo-io/gloo/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|