diff --git a/overlays/clickup/default.nix b/overlays/clickup/default.nix index ceac170..3815fc8 100644 --- a/overlays/clickup/default.nix +++ b/overlays/clickup/default.nix @@ -5,7 +5,7 @@ appimageTools.wrapType2 rec { version = "3.1.2"; src = fetchurl { - url = "https://desktop.clickup.com/linux"; + url = "https://web.archive.org/web/20221027054240/https://desktop.clickup.com/linux"; sha256 = "sha256-Qkvs01L9qfvZ5E9BnLdw2oWYaL5tYR3faFjlv6pAY2Y="; }; diff --git a/overlays/clockify/default.nix b/overlays/clockify/default.nix new file mode 100644 index 0000000..008f103 --- /dev/null +++ b/overlays/clockify/default.nix @@ -0,0 +1,54 @@ +{ stdenv, lib, fetchurl, dpkg, makeWrapper, libXScrnSaver, electron }: + +stdenv.mkDerivation rec { + pname = "clockify"; + version = "2.0.3"; + + src = fetchurl { + url = "https://web.archive.org/web/20211118160803/https://clockify-resources.s3.eu-central-1.amazonaws.com/downloads/Clockify_Setup.deb"; + sha256 = "sha256-eVZ3OqM1eoWfST7Qu9o8VmLm8ntD+ETf/0aes6RY4Y8="; + }; + + nativeBuildInputs = [ + dpkg + makeWrapper + ]; + + buildInputs = [ + libXScrnSaver + ]; + + libPath = lib.makeLibraryPath buildInputs; + + dontBuild = true; + dontConfigure = true; + + unpackPhase = '' + dpkg-deb -x ${src} ./ + ''; + + installPhase = '' + runHook preInstall + + mv usr $out + mv opt $out + + substituteInPlace $out/share/applications/clockify.desktop \ + --replace "/opt/Clockify" $out/bin + + makeWrapper ${electron}/bin/electron $out/bin/clockify \ + --add-flags $out/opt/Clockify/resources/app.asar \ + --prefix LD_LIBRARY_PATH : ${libPath} + + 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 ]; + platforms = platforms.linux; + + }; +} diff --git a/overlays/default.nix b/overlays/default.nix index 085839e..05fcf5b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -28,5 +28,6 @@ self: super: kubectl-whoami = super.callPackage ./kubectl-whoami { }; clickup = super.callPackage ./clickup { }; + clockify = super.callPackage ./clockify { }; tailscale-systray = super.callPackage ./tailscale-systray { }; }