Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchYarnDeps, 6 yarnConfigHook, 7 yarnInstallHook, 8 versionCheckHook, 9 nix-update-script, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "ghost-cli"; 14 version = "1.28.1"; 15 16 src = fetchFromGitHub { 17 owner = "TryGhost"; 18 repo = "Ghost-CLI"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-gpOaoR/UB8ermQCXlYgoVA3h+OdUGvP6ofjlFlMHA58="; 21 }; 22 23 yarnOfflineCache = fetchYarnDeps { 24 yarnLock = finalAttrs.src + "/yarn.lock"; 25 hash = "sha256-4GJ6I0Iynu+/lmiKat3p/MIivVjcyxxhpXKPSOheBls="; 26 }; 27 28 nativeBuildInputs = [ 29 yarnConfigHook 30 yarnInstallHook 31 ]; 32 nativeInstallCheckInputs = [ versionCheckHook ]; 33 doInstallCheck = true; 34 versionCheckProgram = ''${placeholder "out"}/bin/ghost''; 35 36 passthru = { 37 updateScript = nix-update-script { }; 38 }; 39 40 meta = { 41 description = "CLI Tool for installing & updating Ghost"; 42 mainProgram = "ghost"; 43 homepage = "https://ghost.org/docs/ghost-cli/"; 44 changelog = "https://github.com/TryGhost/Ghost-CLI/blob/v${finalAttrs.version}/CHANGELOG.md"; 45 license = lib.licenses.mit; 46 maintainers = with lib.maintainers; [ cything ]; 47 }; 48})