@@ -1,177 +1,38 @@
1−{ GConf
1+{ stdenv, lib, fetchurl, makeWrapper, wrapGAppsHook, electron
8, common-updater-scripts
2, common-updater-scripts
9−, coreutils
3+, writeShellScript
94− libPath = lib.makeLibraryPath libs;
97− stdenv.mkDerivation rec {
6+stdenv.mkDerivation rec {
98− pname = "stretchly";
7+ pname = "stretchly";
99− version = "0.21.0";
8+ version = "0.21.1";
102− url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
103− sha256 = "1gyyr22xq8s4miiacs8wqhp7lxnwvkvlwhngnq8671l62s6iyjzl";
106− nativeBuildInputs = [
113− dontPatchELF = true;
115− dontConfigure = true;
118− mkdir -p $out/bin $out/lib/stretchly
119− cp -r ./* $out/lib/stretchly/
120− ln -s $out/lib/stretchly/stretchly $out/bin/
123− preFixup = ''
10+ src = fetchurl {
124− patchelf --set-rpath "${libPath}" $out/lib/stretchly/libffmpeg.so
11+ url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
125− patchelf --set-rpath "${libPath}" $out/lib/stretchly/libEGL.so
12+ sha256 = "0776pywyqylwd33m85l4wdr89x0q9xkrjgliag10fp1bswz844lf";
126− patchelf --set-rpath "${libPath}" $out/lib/stretchly/libGLESv2.so
127− patchelf --set-rpath "${libPath}" $out/lib/stretchly/swiftshader/libEGL.so
128− patchelf --set-rpath "${libPath}" $out/lib/stretchly/swiftshader/libGLESv2.so
131− --set-rpath "$out/lib/stretchly:${libPath}" \
132− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
133− $out/lib/stretchly/stretchly
136− --set-rpath "$out/lib/stretchly:${libPath}" \
137− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
138− $out/lib/stretchly/chrome-sandbox
141− meta = with stdenv.lib; {
15+ nativeBuildInputs = [
142− description = "A break time reminder app";
16+ wrapGAppsHook
143− longDescription = ''
144− stretchly is a cross-platform electron app that reminds you to take
145− breaks when working on your computer. By default, it runs in your tray
146− and displays a reminder window containing an idea for a microbreak for 20
147− seconds every 10 minutes. Every 30 minutes, it displays a window
148− containing an idea for a longer 5 minute break.
150− homepage = https://hovancik.net/stretchly;
151− downloadPage = https://hovancik.net/stretchly/downloads/;
152− license = licenses.bsd2;
153− maintainers = with maintainers; [ cdepillabout ];
154− platforms = platforms.linux;
158−in
19+ installPhase = ''
160−buildFHSUserEnv {
22+ mkdir -p $out/bin $out/share/${pname}/
161− inherit (stretchly) meta;
23+ mv resources/app.asar $out/share/${pname}/
163− name = "stretchly";
25+ makeWrapper ${electron}/bin/electron $out/bin/${pname} \
26+ --add-flags $out/share/${pname}/app.asar \
27+ "''${gappsWrapperArgs[@]}" \
28+ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
165− targetPkgs = pkgs: [
30+ runHook postInstall
169− runScript = "stretchly";
171 passthru = {
34 passthru = {
172− updateScript = writeScript "update-stretchly" ''
35+ updateScript = writeShellScript "update-stretchly" ''
175 set -eu -o pipefail
36 set -eu -o pipefail
177 # get the latest release version
38 # get the latest release version
@@ -179,9 +40,23 @@ buildFHSUserEnv {
180 echo "updating to $latest_version..."
41 echo "updating to $latest_version..."
182− ${common-updater-scripts}/bin/update-source-version stretchly.passthru.stretchlyWrapped "$latest_version"
43+ ${common-updater-scripts}/bin/update-source-version stretchly "$latest_version"
185− stretchlyWrapped = stretchly;
47+ meta = with stdenv.lib; {
48+ description = "A break time reminder app";
50+ stretchly is a cross-platform electron app that reminds you to take
51+ breaks when working on your computer. By default, it runs in your tray
52+ and displays a reminder window containing an idea for a microbreak for 20
53+ seconds every 10 minutes. Every 30 minutes, it displays a window
54+ containing an idea for a longer 5 minute break.
56+ homepage = https://hovancik.net/stretchly;
57+ downloadPage = https://hovancik.net/stretchly/downloads/;
58+ license = licenses.bsd2;
59+ maintainers = with maintainers; [ cdepillabout ];
60+ platforms = platforms.linux;