Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchurl, dpkg, makeWrapper, electron }: 2 3stdenv.mkDerivation rec { 4 pname = "clockify"; 5 version = "2.0.3"; 6 7 src = fetchurl { 8 url = "https://web.archive.org/web/20211118160803/https://clockify-resources.s3.eu-central-1.amazonaws.com/downloads/Clockify_Setup.deb"; 9 sha256 = "sha256-eVZ3OqM1eoWfST7Qu9o8VmLm8ntD+ETf/0aes6RY4Y8="; 10 }; 11 12 nativeBuildInputs = [ 13 dpkg 14 makeWrapper 15 ]; 16 17 dontBuild = true; 18 dontConfigure = true; 19 20 unpackPhase = '' 21 dpkg-deb -x ${src} ./ 22 ''; 23 24 installPhase = '' 25 runHook preInstall 26 27 mv usr $out 28 mv opt $out 29 30 substituteInPlace $out/share/applications/clockify.desktop \ 31 --replace "/opt/Clockify" $out/bin 32 33 makeWrapper ${electron}/bin/electron $out/bin/clockify \ 34 --add-flags $out/opt/Clockify/resources/app.asar 35 36 runHook postInstall 37 ''; 38 39 meta = with lib; { 40 description = "Free time tracker and timesheet app that lets you track work hours across projects"; 41 homepage = "https://clockify.me"; 42 license = licenses.unfree; 43 maintainers = with maintainers; [ wolfangaukang ]; 44 platforms = [ "x86_64-linux" ]; 45 46 }; 47}