stretchly: 0.21.1 -> 1.2.0

This commit is contained in:
1000101 2020-10-11 09:53:26 +02:00
parent 82b5381414
commit 8f33fd8638

View file

@ -1,23 +1,33 @@
{ stdenv, lib, fetchurl, makeWrapper, wrapGAppsHook, electron_7 { stdenv
, lib
, fetchurl
, makeWrapper
, electron_9
, common-updater-scripts , common-updater-scripts
, writeShellScript , writeShellScript
, jq
, makeDesktopItem
}: }:
let let
electron = electron_7; electron = electron_9;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "stretchly"; pname = "stretchly";
version = "0.21.1"; version = "1.2.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz"; url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
sha256 = "0776pywyqylwd33m85l4wdr89x0q9xkrjgliag10fp1bswz844lf"; sha256 = "07v9yk9qgya9ladfgbfkwwnbzvczs1cv6yn3zrg9rviyv8zlqjls";
}; };
nativeBuildInputs = [ icon = fetchurl {
wrapGAppsHook url = "https://raw.githubusercontent.com/hovancik/stretchly/v${version}/stretchly_128x128.png";
]; sha256 = "0whfg1fy2hjyk1lzpryikc1aj8agsjhfrb0bf7ggl6r9m8s1rvdl";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -25,15 +35,15 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin $out/share/${pname}/ mkdir -p $out/bin $out/share/${pname}/
mv resources/app.asar $out/share/${pname}/ mv resources/app.asar $out/share/${pname}/
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
makeWrapper ${electron}/bin/electron $out/bin/${pname} \ makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/app.asar \ --add-flags $out/share/${pname}/app.asar
"''${gappsWrapperArgs[@]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
runHook postInstall runHook postInstall
''; '';
passthru = { passthru = {
updateScript = writeShellScript "update-stretchly" '' updateScript = writeShellScript "update-stretchly" ''
set -eu -o pipefail set -eu -o pipefail
@ -47,6 +57,15 @@ stdenv.mkDerivation rec {
''; '';
}; };
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = icon;
desktopName = "Stretchly";
genericName = "Stretchly";
categories = "Utility;";
};
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A break time reminder app"; description = "A break time reminder app";
longDescription = '' longDescription = ''
@ -59,7 +78,7 @@ stdenv.mkDerivation rec {
homepage = "https://hovancik.net/stretchly"; homepage = "https://hovancik.net/stretchly";
downloadPage = "https://hovancik.net/stretchly/downloads/"; downloadPage = "https://hovancik.net/stretchly/downloads/";
license = licenses.bsd2; license = licenses.bsd2;
maintainers = with maintainers; [ cdepillabout ]; maintainers = with maintainers; [ _1000101 ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }