nixpkgs/pkgs/applications/office/ticktick/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

77 lines
1.8 KiB
Nix

{ lib
, fetchurl
, stdenv
, wrapGAppsHook3
, dpkg
, autoPatchelfHook
, glibc
, gcc-unwrapped
, nss
, libdrm
, mesa
, alsa-lib
, xdg-utils
, systemd
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ticktick";
version = "2.0.10";
src = fetchurl {
url = "https://d2atcrkye2ik4e.cloudfront.net/download/linux/linux_deb_x64/${finalAttrs.pname}-${finalAttrs.version}-amd64.deb";
hash = "sha256-wign7U1p4HX6/RwnMm2iVSNaYRhn8Ia6QQd5X6m3B0E=";
};
nativeBuildInputs = [
wrapGAppsHook3
autoPatchelfHook
dpkg
];
buildInputs = [
nss
glibc
libdrm
gcc-unwrapped
mesa
alsa-lib
xdg-utils
];
# Needed to make the process get past zygote_linux fork()'ing
runtimeDependencies = [
systemd
];
unpackPhase = ''
runHook preUnpack
mkdir -p "$out/share" "$out/opt/${finalAttrs.pname}" "$out/bin"
dpkg-deb --fsys-tarfile "$src" | tar --extract --directory="$out"
runHook postUnpack
'';
installPhase = ''
runHook preInstall
cp -av $out/opt/TickTick/* $out/opt/${finalAttrs.pname}
cp -av $out/usr/share/* $out/share
rm -rf $out/usr $out/opt/TickTick
ln -sf "$out/opt/${finalAttrs.pname}/${finalAttrs.pname}" "$out/bin/${finalAttrs.pname}"
substituteInPlace "$out/share/applications/${finalAttrs.pname}.desktop" \
--replace "Exec=/opt/TickTick/ticktick" "Exec=$out/bin/${finalAttrs.pname}"
runHook postInstall
'';
meta = with lib; {
description = "A powerful to-do & task management app with seamless cloud synchronization across all your devices";
homepage = "https://ticktick.com/home/";
license = licenses.unfree;
maintainers = with maintainers; [ hbjydev ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
})