biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / office / ticktick / default.nix
blob3a768c702acdf9873a0e1b9ed08496386badead6
1 { lib
2 , fetchurl
3 , stdenv
4 , wrapGAppsHook
5 , dpkg
6 , autoPatchelfHook
7 , glibc
8 , gcc-unwrapped
9 , nss
10 , libdrm
11 , mesa
12 , alsa-lib
13 , xdg-utils
14 , systemd
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "ticktick";
18   version = "2.0.10";
20   src = fetchurl {
21     url = "https://d2atcrkye2ik4e.cloudfront.net/download/linux/linux_deb_x64/${finalAttrs.pname}-${finalAttrs.version}-amd64.deb";
22     hash = "sha256-wign7U1p4HX6/RwnMm2iVSNaYRhn8Ia6QQd5X6m3B0E=";
23   };
25   nativeBuildInputs = [
26     wrapGAppsHook
27     autoPatchelfHook
28     dpkg
29   ];
31   buildInputs = [
32     nss
33     glibc
34     libdrm
35     gcc-unwrapped
36     mesa
37     alsa-lib
38     xdg-utils
39   ];
41   # Needed to make the process get past zygote_linux fork()'ing
42   runtimeDependencies = [
43     systemd
44   ];
46   unpackPhase = ''
47     runHook preUnpack
49     mkdir -p "$out/share" "$out/opt/${finalAttrs.pname}" "$out/bin"
50     dpkg-deb --fsys-tarfile "$src" | tar --extract --directory="$out"
52     runHook postUnpack
53   '';
55   installPhase = ''
56     runHook preInstall
58     cp -av $out/opt/TickTick/* $out/opt/${finalAttrs.pname}
59     cp -av $out/usr/share/* $out/share
60     rm -rf $out/usr $out/opt/TickTick
61     ln -sf "$out/opt/${finalAttrs.pname}/${finalAttrs.pname}" "$out/bin/${finalAttrs.pname}"
63     substituteInPlace "$out/share/applications/${finalAttrs.pname}.desktop" \
64       --replace "Exec=/opt/TickTick/ticktick" "Exec=$out/bin/${finalAttrs.pname}"
66     runHook postInstall
67   '';
69   meta = with lib; {
70     description = "A powerful to-do & task management app with seamless cloud synchronization across all your devices";
71     homepage = "https://ticktick.com/home/";
72     license = licenses.unfree;
73     maintainers = with maintainers; [ hbjydev ];
74     platforms = [ "x86_64-linux" ];
75     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
76   };