nixpkgs/pkgs/tools/admin/fioctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2022-07-08 13:22:49 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, fioctl }:
buildGoModule rec {
pname = "fioctl";
2024-05-29 02:03:12 +00:00
version = "0.42";
src = fetchFromGitHub {
owner = "foundriesio";
repo = "fioctl";
rev = "v${version}";
2024-05-29 02:03:12 +00:00
sha256 = "sha256-UqUr57D5nZh+zanzCmxujLbA8eICKx0NUlP78YH8x/Q=";
};
2024-05-29 02:03:12 +00:00
vendorHash = "sha256-A5buz9JOAiXx9X4qmi7mTMJiy/E6XBaFlG/sXOG5AKw=";
2021-08-26 06:45:51 +00:00
ldflags = [
2022-07-08 13:22:49 +00:00
"-s" "-w"
"-X github.com/foundriesio/fioctl/subcommands/version.Commit=${src.rev}"
2021-08-26 06:45:51 +00:00
];
2022-07-08 13:22:49 +00:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd fioctl \
--bash <($out/bin/fioctl completion bash) \
--fish <($out/bin/fioctl completion fish) \
--zsh <($out/bin/fioctl completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = fioctl;
command = "HOME=$(mktemp -d) fioctl version";
version = "v${version}";
};
meta = with lib; {
2022-07-08 13:22:49 +00:00
description = "Simple CLI to manage your Foundries Factory";
homepage = "https://github.com/foundriesio/fioctl";
license = licenses.asl20;
maintainers = with maintainers; [ nixinator matthewcroughan ];
2024-02-11 02:19:15 +00:00
mainProgram = "fioctl";
};
}