Files
nixpkgs/pkgs/by-name/st/stretchly/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
2.0 KiB
Nix

{
stdenv,
lib,
fetchurl,
makeWrapper,
electron,
makeDesktopItem,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "stretchly";
version = "1.18.1";
src = fetchurl {
url = "https://github.com/hovancik/stretchly/releases/download/v${finalAttrs.version}/stretchly-${finalAttrs.version}.tar.xz";
hash = "sha256-eHhOxocAQAiuvfJsD4ifFw09B7bry4DWIOA9S6pP+jw=";
};
icon = fetchurl {
url = "https://raw.githubusercontent.com/hovancik/stretchly/v${finalAttrs.version}/stretchly_128x128.png";
hash = "sha256-tO0cNKopG/recQus7KDUTyGpApvR5/tpmF5C4V14DnI=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/stretchly/
mv resources/app.asar* $out/share/stretchly/
mkdir -p $out/share/applications
ln -s ${finalAttrs.desktopItem}/share/applications/* $out/share/applications/
makeWrapper ${electron}/bin/electron $out/bin/stretchly \
--add-flags $out/share/stretchly/app.asar
runHook postInstall
'';
desktopItem = makeDesktopItem {
name = "stretchly";
exec = "stretchly";
icon = finalAttrs.icon;
desktopName = "Stretchly";
genericName = "Stretchly";
categories = [ "Utility" ];
};
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Break time reminder app";
longDescription = ''
stretchly is a cross-platform electron app that reminds you to take
breaks when working on your computer. By default, it runs in your tray
and displays a reminder window containing an idea for a microbreak for 20
seconds every 10 minutes. Every 30 minutes, it displays a window
containing an idea for a longer 5 minute break.
'';
homepage = "https://hovancik.net/stretchly";
downloadPage = "https://hovancik.net/stretchly/downloads/";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ _1000101 ];
platforms = lib.platforms.linux;
mainProgram = "stretchly";
};
})