Files
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
nodejs,
makeBinaryWrapper,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cloudflare-cli";
version = "5.1.0";
src = fetchFromGitHub {
owner = "danielpigott";
repo = "cloudflare-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-FE6LvzGd3Pl31vocXSZ6VY6P3iuVPxQR1eJwUSkXf70=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-dH0eW2IIxgqLiJHAmDKbeA0xz2EMWrZrKIf3P2mBDKU=";
};
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
nodejs
makeBinaryWrapper
];
postInstall = ''
wrapProgram $out/bin/cfcli \
--chdir $out/lib/node_modules/cloudflare-cli
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/cfcli --help >/dev/null
runHook postInstallCheck
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI for interacting with Cloudflare";
homepage = "https://github.com/danielpigott/cloudflare-cli";
changelog = "https://github.com/danielpigott/cloudflare-cli/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "cfcli";
};
})