diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 881fd7024f1f..93db923c267e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4869,6 +4869,12 @@ githubId = 217899; name = "Cyryl Płotnicki"; }; + cything = { + name = "cy"; + email = "nix@cything.io"; + github = "cything"; + githubId = 45041772; + }; d3vil0p3r = { name = "Antonio Voza"; email = "vozaanthony@gmail.com"; diff --git a/pkgs/by-name/gh/ghost-cli/package.nix b/pkgs/by-name/gh/ghost-cli/package.nix new file mode 100644 index 000000000000..43a9ee51388a --- /dev/null +++ b/pkgs/by-name/gh/ghost-cli/package.nix @@ -0,0 +1,48 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnInstallHook, + versionCheckHook, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ghost-cli"; + version = "1.26.1"; + + src = fetchFromGitHub { + owner = "TryGhost"; + repo = "Ghost-CLI"; + tag = "v${finalAttrs.version}"; + hash = "sha256-2zyRkPTQBzF+7nmlHPMi4S0BAdmUwIBkwD71y1y7Pn8="; + }; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = finalAttrs.src + "/yarn.lock"; + hash = "sha256-No+Hkb2ivrCSd0S9L5QxZ8ReX9NANMRITKHFvjzRSuc="; + }; + + 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 ]; + }; +})