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
86 lines
2.1 KiB
Nix
86 lines
2.1 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildGoModule,
|
|
buildPackages,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
buildGoModule (finalAttrs: {
|
|
pname = "foxglove-cli";
|
|
version = "1.0.26";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "foxglove";
|
|
repo = "foxglove-cli";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-WDCxkfWzx/tCnzQGP1MZRKfwM3PbwOHyyLUKgVTLmFU=";
|
|
};
|
|
|
|
vendorHash = "sha256-GjgDRFzW4zqVooHx9WEgWkcnZ+zQsr09OuZxtc9rZD4=";
|
|
|
|
env.CGO_ENABLED = 0;
|
|
tags = [ "netgo" ];
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=${finalAttrs.version}"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
modRoot = "foxglove";
|
|
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
"TestDoExport"
|
|
"TestExport"
|
|
"TestExportCommand"
|
|
"TestImport"
|
|
"TestImportCommand"
|
|
"TestLogin"
|
|
"TestLoginCommand"
|
|
];
|
|
in
|
|
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
|
|
let
|
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
|
in
|
|
''
|
|
installShellCompletion --cmd foxglove \
|
|
--bash <(${emulator} $out/bin/foxglove completion bash) \
|
|
--fish <(${emulator} $out/bin/foxglove completion fish) \
|
|
--zsh <(${emulator} $out/bin/foxglove completion zsh)
|
|
''
|
|
);
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
|
|
versionCheckProgramArg = "version";
|
|
versionCheckKeepEnvironment = [ "HOME" ];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/foxglove/foxglove-cli/releases/tag/v${finalAttrs.version}";
|
|
description = "Interact with the Foxglove platform";
|
|
downloadPage = "https://github.com/foxglove/foxglove-cli";
|
|
homepage = "https://docs.foxglove.dev/docs/cli";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ sascha8a ];
|
|
mainProgram = "foxglove";
|
|
};
|
|
})
|