about summary refs log tree commit diff
path: root/pkgs/applications/networking/localsend/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/localsend/update.sh')
-rwxr-xr-xpkgs/applications/networking/localsend/update.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/applications/networking/localsend/update.sh b/pkgs/applications/networking/localsend/update.sh
index e142c7e37955b..e75b28435537d 100755
--- a/pkgs/applications/networking/localsend/update.sh
+++ b/pkgs/applications/networking/localsend/update.sh
@@ -1,5 +1,5 @@
 #! /usr/bin/env nix-shell
-#! nix-shell -I nixpkgs=./. -i bash -p curl gnused jq
+#! nix-shell -I nixpkgs=./. -i bash -p curl gnused jq yq nix-prefetch-url
 
 set -eou pipefail
 
@@ -19,3 +19,8 @@ sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/default.nix"
 DARWIN_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}.dmg"
 DARWIN_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${DARWIN_x64_URL}))
 sed -i "/darwin/,/hash/{s|hash = \".*\"|hash = \"${DARWIN_X64_SHA}\"|}" "$ROOT/default.nix"
+
+GIT_SRC_URL="https://github.com/localsend/localsend/archive/refs/tags/v${latestVersion}.tar.gz"
+GIT_SRC_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack ${GIT_SRC_URL}))
+sed -i "/linux/,/hash/{s|hash = \".*\"|hash = \"${GIT_SRC_SHA}\"|}" "$ROOT/default.nix"
+curl https://raw.githubusercontent.com/localsend/localsend/v${latestVersion}/app/pubspec.lock | yq . > $ROOT/pubspec.lock.json