From c49d99680e4e9567f1ff469018240d11e35bbf87 Mon Sep 17 00:00:00 2001 From: cy Date: Wed, 18 Dec 2024 03:08:55 -0500 Subject: [PATCH] ghost-cli: init at 1.26.1 --- pkgs/by-name/gh/ghost-cli/package.nix | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/gh/ghost-cli/package.nix 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 00000000000000..b3e38cd80ce5c7 --- /dev/null +++ b/pkgs/by-name/gh/ghost-cli/package.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnInstallHook, + versionCheckHook, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ghost-cli"; + version = "1.26.1"; + + src = fetchFromGitHub { + owner = "TryGhost"; + repo = "Ghost-CLI"; + rev = "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''; + + meta = { + description = "CLI Tool for installing & updating Ghost"; + mainProgram = "ghost"; + homepage = "https://ghost.org/docs/ghost-cli/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ cything ]; + }; +})