nixpkgs/pkgs/applications/office/clockify/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2021-11-18 16:22:18 +00:00
{ stdenv, lib, fetchurl, dpkg, makeWrapper, electron }:
stdenv.mkDerivation rec {
pname = "clockify";
2023-11-11 16:59:03 +00:00
version = "2.1.6";
2021-11-18 16:22:18 +00:00
src = fetchurl {
2023-11-11 16:59:03 +00:00
url = "https://web.archive.org/web/20231110130133/https://clockify.me/downloads/Clockify_Setup_x64.deb";
hash = "sha256-jndoMk3vqk8a5jMzKVo6ThovSISmcu+hef9IJcg3reQ=";
2021-11-18 16:22:18 +00:00
};
nativeBuildInputs = [
dpkg
makeWrapper
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
substituteInPlace $out/share/applications/clockify.desktop \
2023-11-11 16:59:03 +00:00
--replace "/opt/Clockify/" ""
2021-11-18 16:22:18 +00:00
makeWrapper ${electron}/bin/electron $out/bin/clockify \
--add-flags $out/opt/Clockify/resources/app.asar
runHook postInstall
'';
meta = with lib; {
description = "Free time tracker and timesheet app that lets you track work hours across projects";
homepage = "https://clockify.me";
license = licenses.unfree;
maintainers = with maintainers; [ wolfangaukang ];
2023-11-11 16:59:03 +00:00
mainProgram = "clockify";
2021-11-18 16:22:18 +00:00
platforms = [ "x86_64-linux" ];
};
}