Merge pull request #253305 from adamcstephens/localsend/1.11.1
localsend: 1.11.0 -> 1.11.1
This commit is contained in:
commit
46d6445c7f
2 changed files with 33 additions and 3 deletions
|
@ -2,16 +2,21 @@
|
|||
|
||||
let
|
||||
pname = "localsend";
|
||||
version = "1.11.0";
|
||||
version = "1.11.1";
|
||||
|
||||
hashes = {
|
||||
x86_64-linux = "sha256-K4M9cks0FNsCLIqQhSgUAz3tRMKng6JkZ/ZfwG2hZJA=";
|
||||
x86_64-darwin = "sha256-Cixo00I4BBAmUnszsz+CxPX3EY175UTufCmwQmIsEgg=";
|
||||
};
|
||||
|
||||
srcs = rec {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://github.com/localsend/localsend/releases/download/v${version}/LocalSend-${version}-linux-x86-64.AppImage";
|
||||
hash = "sha256-IIxknLzlAjH27o54R0Zm7T8bhDRAIgh58Evs7zPMrPk=";
|
||||
hash = hashes.x86_64-linux;
|
||||
};
|
||||
x86_64-darwin = fetchurl {
|
||||
url = "https://github.com/localsend/localsend/releases/download/v${version}/LocalSend-${version}.dmg";
|
||||
hash = "sha256-NSwyyfFPQpcVZLKGqZbaBCYSQdlNxxpI8EJo49eYB/A=";
|
||||
hash = hashes.x86_64-darwin;
|
||||
};
|
||||
aarch64-darwin = x86_64-darwin;
|
||||
};
|
||||
|
|
25
pkgs/applications/networking/localsend/update.sh
Executable file
25
pkgs/applications/networking/localsend/update.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -I nixpkgs=./. -i bash -p curl gnused
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
latestVersion=$(curl --fail --silent https://api.github.com/repos/localsend/localsend/releases/latest | jq --raw-output .tag_name | sed 's/^v//')
|
||||
|
||||
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; localsend.version or (lib.getVersion localsend)" | tr -d '"')
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
||||
echo "package is up-to-date: $currentVersion"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/default.nix"
|
||||
|
||||
LINUX_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}-linux-x86-64.AppImage"
|
||||
LINUX_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${LINUX_x64_URL}))
|
||||
sed -i "0,/x86_64-linux/{s|x86_64-linux = \".*\"|x86_64-linux = \"${LINUX_X64_SHA}\"|}" "$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 "0,/x86_64-darwin/{s|x86_64-darwin = \".*\"|x86_64-darwin = \"${DARWIN_X64_SHA}\"|}" "$ROOT/default.nix"
|
Loading…
Reference in a new issue