File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
pkgs/by-name/ch/cherry-studio Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 99 writableTmpDirAsHomeHook ,
1010 makeDesktopItem ,
1111 copyDesktopItems ,
12- nix-update-script ,
1312 commandLineArgs ? "" ,
1413} :
1514
@@ -112,7 +111,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
112111 runHook postInstall
113112 '' ;
114113
115- passthru . updateScript = nix- update-script { } ;
114+ passthru . updateScript = ./ update.sh ;
116115
117116 meta = {
118117 description = "Desktop client that supports for multiple LLM providers" ;
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env nix-shell
2+ #! nix-shell -i bash -p curl gnused jq nix bash coreutils nix-update
3+
4+ set -eou pipefail
5+
6+ latestTag=$( curl ${GITHUB_TOKEN: +-u " :$GITHUB_TOKEN " } -sL https://api.github.com/repos/CherryHQ/cherry-studio/releases/latest | jq --raw-output .tag_name)
7+ latestVersion=$( echo " $latestTag " | sed ' s/^v//' )
8+
9+ currentVersion=$( nix-instantiate --eval -E " with import ./. {}; cherry-studio.version or (lib.getVersion cherry-studio)" | tr -d ' "' )
10+
11+ if [[ " $currentVersion " == " $latestVersion " ]]; then
12+ echo " package is up-to-date: $currentVersion "
13+ exit 0
14+ fi
15+
16+ nix-update cherry-studio --version " $latestVersion "
You can’t perform that action at this time.
0 commit comments