Files
nixpkgs/pkgs/by-name/gh/ghost-cli/package.nix
2026-04-09 21:30:41 +00:00

49 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ghost-cli";
version = "1.29.1";
src = fetchFromGitHub {
owner = "TryGhost";
repo = "Ghost-CLI";
tag = "v${finalAttrs.version}";
hash = "sha256-Zwm1v5xY3jq5krbGFVmA6qmVsYY5RdMEnHcefzKj6V4=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-MpgTPBQ/VCwWzCN/a/y1TJyB6rSjwAIKu/RbBXE6fos=";
};
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/ghost";
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "CLI Tool for installing & updating Ghost";
mainProgram = "ghost";
homepage = "https://ghost.org/docs/ghost-cli/";
changelog = "https://github.com/TryGhost/Ghost-CLI/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cything ];
};
})