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
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cfspeedtest";
|
|
version = "1.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "code-inflation";
|
|
repo = "cfspeedtest";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-MWHZllH0QVylmvwEwCX2uhNSEx9p5xEeW0u/zGyjNZE=";
|
|
};
|
|
|
|
cargoHash = "sha256-wTytRbue26KVaGb3LarTCNdq56psIayVDul4iQkwH2s=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd cfspeedtest \
|
|
--bash <($out/bin/cfspeedtest --generate-completion bash) \
|
|
--fish <($out/bin/cfspeedtest --generate-completion fish) \
|
|
--zsh <($out/bin/cfspeedtest --generate-completion zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "Unofficial CLI for speed.cloudflare.com";
|
|
homepage = "https://github.com/code-inflation/cfspeedtest";
|
|
changelog = "https://github.com/code-inflation/cfspeedtest/releases/tag/${finalAttrs.src.tag}";
|
|
license = with lib.licenses; [ mit ];
|
|
maintainers = with lib.maintainers; [
|
|
colemickens
|
|
stepbrobd
|
|
];
|
|
mainProgram = "cfspeedtest";
|
|
};
|
|
})
|