git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #80035 from dtzWill/update/stretchly-0.21.1-electron7-simplify

stretchly: 0.21.0 -> 0.21.1, use system electron, simplify

commita15e0daf9918f4f29794652655e13e31cd3b79da authorAaron Andersen <aaron@fosslib.net> dateWed 25 Mar 2020, 19:26 (7 years ago) parentf4a9d8bd7131ce
2 files changed+41−165
pkgs/applications/misc/stretchly/default.nix+39−164 pkgs/top-level/all-packages.nix+2−1
pkgs/applications/misc/stretchly/default.nix+39−164
@@ -1,177 +1,38 @@
1−{ GConf
2−, alsaLib
3−, at-spi2-atk
4−, at-spi2-core
5−, atk
6−, buildFHSUserEnv
7−, cairo
1+{ stdenv, lib, fetchurl, makeWrapper, wrapGAppsHook, electron
82, common-updater-scripts
9−, coreutils
10−, cups
11−, dbus
12−, expat
13−, fetchurl
14−, fontconfig
15−, gdk-pixbuf
16−, glib
17−, gtk2
18−, gtk3
19−, lib
20−, libX11
21−, libXScrnSaver
22−, libXcomposite
23−, libXcursor
24−, libXdamage
25−, libXext
26−, libXfixes
27−, libXi
28−, libXrandr
29−, libXrender
30−, libXtst
31−, libappindicator
32−, libdrm
33−, libnotify
34−, libpciaccess
35−, libpng12
36−, libuuid
37−, libxcb
38−, nspr
39−, nss
40−, pango
41−, pciutils
42−, pulseaudio
43−, runtimeShell
44−, stdenv
45−, udev
46−, wrapGAppsHook
47−, writeScript
48−, file
3+, writeShellScript
494}:
505
51−let
52− libs = [
53− GConf
54− alsaLib
55− at-spi2-atk
56− at-spi2-core
57− atk
58− cairo
59− cups
60− dbus
61− expat
62− fontconfig
63− gdk-pixbuf
64− glib
65− gtk2
66− gtk3
67− libX11
68− libXScrnSaver
69− libXcomposite
70− libXcursor
71− libXdamage
72− libXext
73− libXfixes
74− libXi
75− libXrandr
76− libXrender
77− libXtst
78− libappindicator
79− libdrm
80− libnotify
81− libpciaccess
82− libpng12
83− libuuid
84− libxcb
85− nspr
86− nss
87− pango
88− pciutils
89− pulseaudio
90− stdenv.cc.cc.lib
91− udev
92− ];
93−
94− libPath = lib.makeLibraryPath libs;
95−
96− stretchly =
97− stdenv.mkDerivation rec {
98− pname = "stretchly";
99− version = "0.21.0";
100−
101− src = fetchurl {
102− url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
103− sha256 = "1gyyr22xq8s4miiacs8wqhp7lxnwvkvlwhngnq8671l62s6iyjzl";
104− };
105−
106− nativeBuildInputs = [
107− wrapGAppsHook
108− coreutils
109− ];
110−
111− buildInputs = libs;
112−
113− dontPatchELF = true;
114− dontBuild = true;
115− dontConfigure = true;
116−
117− installPhase = ''
118− mkdir -p $out/bin $out/lib/stretchly
119− cp -r ./* $out/lib/stretchly/
120− ln -s $out/lib/stretchly/stretchly $out/bin/
121− '';
6+stdenv.mkDerivation rec {
7+ pname = "stretchly";
8+ version = "0.21.1";
1229
123− preFixup = ''
124− patchelf --set-rpath "${libPath}" $out/lib/stretchly/libffmpeg.so
125− patchelf --set-rpath "${libPath}" $out/lib/stretchly/libEGL.so
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
129−
130− patchelf \
131− --set-rpath "$out/lib/stretchly:${libPath}" \
132− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
133− $out/lib/stretchly/stretchly
134−
135− patchelf \
136− --set-rpath "$out/lib/stretchly:${libPath}" \
137− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
138− $out/lib/stretchly/chrome-sandbox
139− '';
10+ src = fetchurl {
11+ url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
12+ sha256 = "0776pywyqylwd33m85l4wdr89x0q9xkrjgliag10fp1bswz844lf";
13+ };
14014
141− meta = with stdenv.lib; {
142− description = "A break time reminder app";
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.
149− '';
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;
155− };
156− };
15+ nativeBuildInputs = [
16+ wrapGAppsHook
17+ ];
15718
158−in
19+ installPhase = ''
20+ runHook preInstall
15921
160−buildFHSUserEnv {
161− inherit (stretchly) meta;
22+ mkdir -p $out/bin $out/share/${pname}/
23+ mv resources/app.asar $out/share/${pname}/
16224
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 ]}"
16429
165− targetPkgs = pkgs: [
166− stretchly
167− ];
30+ runHook postInstall
31+ '';
16832
169− runScript = "stretchly";
17033
17134 passthru = {
172− updateScript = writeScript "update-stretchly" ''
173− #!${runtimeShell}
174−
35+ updateScript = writeShellScript "update-stretchly" ''
17536 set -eu -o pipefail
17637
17738 # get the latest release version
@@ -179,9 +40,23 @@ buildFHSUserEnv {
17940
18041 echo "updating to $latest_version..."
18142
182− ${common-updater-scripts}/bin/update-source-version stretchly.passthru.stretchlyWrapped "$latest_version"
43+ ${common-updater-scripts}/bin/update-source-version stretchly "$latest_version"
18344 '';
45+ };
18446
185− stretchlyWrapped = stretchly;
47+ meta = with stdenv.lib; {
48+ description = "A break time reminder app";
49+ longDescription = ''
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.
55+ '';
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;
18661 };
18762}
pkgs/top-level/all-packages.nix+2−1
@@ -22038,7 +22038,8 @@ in
2203822038 stp = callPackage ../applications/science/logic/stp { };
2203922039
2204022040 stretchly = callPackage ../applications/misc/stretchly {
22041− inherit (gnome2) GConf;
22041+ # Error on launch w/electron_8
22042+ electron = electron_7;
2204222043 };
2204322044
2204422045 stumpish = callPackage ../applications/window-managers/stumpish {};