diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-05-02 18:01:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 18:01:05 +0000 |
commit | 31135daf485709c22c7c64f6cddfd436731cb590 (patch) | |
tree | 1e1e859b59a4c8948db34d42439b5599fdba6d3e /pkgs/applications/office | |
parent | 7e5eff56a35b2d87cb2bd2802a3aea9d0f761d0a (diff) | |
parent | 4c704748b3f2dc351cfb7168793edd84837064a6 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r-- | pkgs/applications/office/clockify/default.nix | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/pkgs/applications/office/clockify/default.nix b/pkgs/applications/office/clockify/default.nix index efd20632a2a31..7b2faa6b7d203 100644 --- a/pkgs/applications/office/clockify/default.nix +++ b/pkgs/applications/office/clockify/default.nix @@ -1,40 +1,27 @@ -{ stdenv, lib, fetchurl, dpkg, makeWrapper, electron }: +{ lib +, appimageTools +, fetchurl }: -stdenv.mkDerivation rec { +appimageTools.wrapType2 rec { pname = "clockify"; - version = "2.1.6"; + version = "2.1.17.1354"; src = fetchurl { - url = "https://web.archive.org/web/20231110130133/https://clockify.me/downloads/Clockify_Setup_x64.deb"; - hash = "sha256-jndoMk3vqk8a5jMzKVo6ThovSISmcu+hef9IJcg3reQ="; + url = "https://web.archive.org/web/20240406052908/https://clockify.me/downloads/Clockify_Setup.AppImage"; + hash = "sha256-G5VOAf6PrjHUsnk7IlXdqJ2D941cnggjuHkkgrOaVaA="; }; - nativeBuildInputs = [ - dpkg - makeWrapper - ]; + extraInstallCommands = + let appimageContents = appimageTools.extract { inherit pname version src; }; + in '' + mv $out/bin/${pname}-${version} $out/bin/${pname} - dontBuild = true; - dontConfigure = true; + install -Dm 444 ${appimageContents}/clockify.desktop -t $out/share/applications + install -Dm 444 ${appimageContents}/clockify.png -t $out/share/pixmaps - unpackPhase = '' - dpkg-deb -x ${src} ./ - ''; - - installPhase = '' - runHook preInstall - - mv usr $out - mv opt $out - - substituteInPlace $out/share/applications/clockify.desktop \ - --replace "/opt/Clockify/" "" - - makeWrapper ${electron}/bin/electron $out/bin/clockify \ - --add-flags $out/opt/Clockify/resources/app.asar - - runHook postInstall - ''; + substituteInPlace $out/share/applications/clockify.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + ''; meta = with lib; { description = "Free time tracker and timesheet app that lets you track work hours across projects"; |