localsend: 1.11.0 -> 1.11.1

+33 -3
+8 -3
pkgs/applications/networking/localsend/default.nix
··· 2 2 3 3 let 4 4 pname = "localsend"; 5 - version = "1.11.0"; 5 + version = "1.11.1"; 6 + 7 + hashes = { 8 + x86_64-linux = "sha256-K4M9cks0FNsCLIqQhSgUAz3tRMKng6JkZ/ZfwG2hZJA="; 9 + x86_64-darwin = "sha256-Cixo00I4BBAmUnszsz+CxPX3EY175UTufCmwQmIsEgg="; 10 + }; 6 11 7 12 srcs = rec { 8 13 x86_64-linux = fetchurl { 9 14 url = "https://github.com/localsend/localsend/releases/download/v${version}/LocalSend-${version}-linux-x86-64.AppImage"; 10 - hash = "sha256-IIxknLzlAjH27o54R0Zm7T8bhDRAIgh58Evs7zPMrPk="; 15 + hash = hashes.x86_64-linux; 11 16 }; 12 17 x86_64-darwin = fetchurl { 13 18 url = "https://github.com/localsend/localsend/releases/download/v${version}/LocalSend-${version}.dmg"; 14 - hash = "sha256-NSwyyfFPQpcVZLKGqZbaBCYSQdlNxxpI8EJo49eYB/A="; 19 + hash = hashes.x86_64-darwin; 15 20 }; 16 21 aarch64-darwin = x86_64-darwin; 17 22 };
+25
pkgs/applications/networking/localsend/update.sh
··· 1 + #! /usr/bin/env nix-shell 2 + #! nix-shell -I nixpkgs=./. -i bash -p curl gnused 3 + 4 + set -eou pipefail 5 + 6 + ROOT="$(dirname "$(readlink -f "$0")")" 7 + 8 + latestVersion=$(curl --fail --silent https://api.github.com/repos/localsend/localsend/releases/latest | jq --raw-output .tag_name | sed 's/^v//') 9 + 10 + currentVersion=$(nix-instantiate --eval -E "with import ./. {}; localsend.version or (lib.getVersion localsend)" | tr -d '"') 11 + 12 + if [[ "$currentVersion" == "$latestVersion" ]]; then 13 + echo "package is up-to-date: $currentVersion" 14 + exit 0 15 + fi 16 + 17 + sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/default.nix" 18 + 19 + LINUX_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}-linux-x86-64.AppImage" 20 + LINUX_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${LINUX_x64_URL})) 21 + sed -i "0,/x86_64-linux/{s|x86_64-linux = \".*\"|x86_64-linux = \"${LINUX_X64_SHA}\"|}" "$ROOT/default.nix" 22 + 23 + DARWIN_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}.dmg" 24 + DARWIN_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${DARWIN_x64_URL})) 25 + sed -i "0,/x86_64-darwin/{s|x86_64-darwin = \".*\"|x86_64-darwin = \"${DARWIN_X64_SHA}\"|}" "$ROOT/default.nix"