From 80223d5e0c5bef1b22bfce1721b9a54839b965d2 Mon Sep 17 00:00:00 2001 From: liberodark Date: Fri, 24 Jan 2025 13:43:48 +0100 Subject: [PATCH] stretchly: 1.16.0 -> 1.17.2 --- pkgs/by-name/st/stretchly/package.nix | 32 +++++++++------------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/st/stretchly/package.nix b/pkgs/by-name/st/stretchly/package.nix index b921992f6817..684cf57eadc2 100644 --- a/pkgs/by-name/st/stretchly/package.nix +++ b/pkgs/by-name/st/stretchly/package.nix @@ -4,18 +4,17 @@ fetchurl, makeWrapper, electron, - common-updater-scripts, - writeShellScript, makeDesktopItem, + nix-update-script, }: stdenv.mkDerivation (finalAttrs: { pname = "stretchly"; - version = "1.16.0"; + version = "1.17.2"; src = fetchurl { url = "https://github.com/hovancik/stretchly/releases/download/v${finalAttrs.version}/stretchly-${finalAttrs.version}.tar.xz"; - hash = "sha256-gOMUXGldtZUfqLABJHfbToYe0pcAn8dRWEFxCi/gY9Y="; + hash = "sha256-IsVmdsmLfNkZ7B9i8TjTHMymsmYLJY5AJleAoEwnUKk="; }; icon = fetchurl { @@ -40,19 +39,6 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - passthru = { - updateScript = writeShellScript "update-stretchly" '' - set -eu -o pipefail - - # get the latest release version - latest_version=$(curl -s https://api.github.com/repos/hovancik/stretchly/releases/latest | jq --raw-output .tag_name | sed -e 's/^v//') - - echo "updating to $latest_version..." - - ${common-updater-scripts}/bin/update-source-version stretchly "$latest_version" - ''; - }; - desktopItem = makeDesktopItem { name = finalAttrs.pname; exec = finalAttrs.pname; @@ -62,7 +48,11 @@ stdenv.mkDerivation (finalAttrs: { categories = [ "Utility" ]; }; - meta = with lib; { + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { description = "Break time reminder app"; longDescription = '' stretchly is a cross-platform electron app that reminds you to take @@ -73,9 +63,9 @@ stdenv.mkDerivation (finalAttrs: { ''; homepage = "https://hovancik.net/stretchly"; downloadPage = "https://hovancik.net/stretchly/downloads/"; - license = licenses.bsd2; - maintainers = with maintainers; [ _1000101 ]; - platforms = platforms.linux; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ _1000101 ]; + platforms = lib.platforms.linux; mainProgram = "stretchly"; }; })