snipaste: 2.9.2-Beta -> 2.10.2 + add update script (#349305)
This commit is contained in:
commit
d504d42cdf
@ -5,18 +5,23 @@
|
|||||||
}:
|
}:
|
||||||
appimageTools.wrapType2 rec {
|
appimageTools.wrapType2 rec {
|
||||||
pname = "snipaste";
|
pname = "snipaste";
|
||||||
version = "2.9.2-Beta";
|
version = "2.10.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.snipaste.com/archives/Snipaste-${version}-x86_64.AppImage";
|
url = "https://download.snipaste.com/archives/Snipaste-${version}-x86_64.AppImage";
|
||||||
hash = "sha256-oV69uABjzkbQdwb+1wRRxszhrwI4uyzhQZ4aXBnyeo8=";
|
hash = "sha256-u9e2d9ZpHDbDIsFkseOdJX2Kspn9TkhFfZxbeielDA8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Screenshot tools";
|
description = "Screenshot tools";
|
||||||
homepage = "https://www.snipaste.com/";
|
homepage = "https://www.snipaste.com/";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
|
maintainers = with lib.maintainers; [
|
||||||
|
luftmensch-luftmensch
|
||||||
|
ltrump
|
||||||
|
];
|
||||||
mainProgram = "snipaste";
|
mainProgram = "snipaste";
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||||
|
15
pkgs/by-name/sn/snipaste/update.sh
Executable file
15
pkgs/by-name/sn/snipaste/update.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p bash curl coreutils jq common-updater-scripts
|
||||||
|
|
||||||
|
latestTag=$(curl -sSfL https://www.snipaste.com/linux_version | jq -r ".subject")
|
||||||
|
latestVersion="$(expr "$latestTag" : 'v\(.*\)')"
|
||||||
|
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; snipaste.version" | tr -d '"')
|
||||||
|
|
||||||
|
if [[ "$latestVersion" == "$currentVersion" ]]; then
|
||||||
|
echo "package is up-to-date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefetch=$(nix-prefetch-url "https://download.snipaste.com/archives/Snipaste-$latestVersion-x86_64.AppImage")
|
||||||
|
hash=$(nix-hash --type sha256 --to-sri "$prefetch")
|
||||||
|
update-source-version snipaste "$latestVersion" "$hash" --ignore-same-version
|
Loading…
Reference in New Issue
Block a user