6 , common-updater-scripts
11 stdenv.mkDerivation (finalAttrs: {
16 url = "https://github.com/hovancik/stretchly/releases/download/v${finalAttrs.version}/stretchly-${finalAttrs.version}.tar.xz";
17 hash = "sha256-gOMUXGldtZUfqLABJHfbToYe0pcAn8dRWEFxCi/gY9Y=";
21 url = "https://raw.githubusercontent.com/hovancik/stretchly/v${finalAttrs.version}/stretchly_128x128.png";
22 hash = "sha256-tO0cNKopG/recQus7KDUTyGpApvR5/tpmF5C4V14DnI=";
25 nativeBuildInputs = [ makeWrapper ];
30 mkdir -p $out/bin $out/share/${finalAttrs.pname}/
31 mv resources/app.asar* $out/share/${finalAttrs.pname}/
33 mkdir -p $out/share/applications
34 ln -s ${finalAttrs.desktopItem}/share/applications/* $out/share/applications/
36 makeWrapper ${electron}/bin/electron $out/bin/${finalAttrs.pname} \
37 --add-flags $out/share/${finalAttrs.pname}/app.asar
43 updateScript = writeShellScript "update-stretchly" ''
46 # get the latest release version
47 latest_version=$(curl -s https://api.github.com/repos/hovancik/stretchly/releases/latest | jq --raw-output .tag_name | sed -e 's/^v//')
49 echo "updating to $latest_version..."
51 ${common-updater-scripts}/bin/update-source-version stretchly "$latest_version"
55 desktopItem = makeDesktopItem {
56 name = finalAttrs.pname;
57 exec = finalAttrs.pname;
58 icon = finalAttrs.icon;
59 desktopName = "Stretchly";
60 genericName = "Stretchly";
61 categories = [ "Utility" ];
65 description = "Break time reminder app";
67 stretchly is a cross-platform electron app that reminds you to take
68 breaks when working on your computer. By default, it runs in your tray
69 and displays a reminder window containing an idea for a microbreak for 20
70 seconds every 10 minutes. Every 30 minutes, it displays a window
71 containing an idea for a longer 5 minute break.
73 homepage = "https://hovancik.net/stretchly";
74 downloadPage = "https://hovancik.net/stretchly/downloads/";
75 license = licenses.bsd2;
76 maintainers = with maintainers; [ _1000101 ];
77 platforms = platforms.linux;
78 mainProgram = "stretchly";