diff --git a/pkgs/by-name/ti/ticktick/package.nix b/pkgs/by-name/ti/ticktick/package.nix index 188aee8e1783..0176b8a30811 100644 --- a/pkgs/by-name/ti/ticktick/package.nix +++ b/pkgs/by-name/ti/ticktick/package.nix @@ -14,14 +14,26 @@ xdg-utils, systemd, }: +let + baseUrl = "https://d2atcrkye2ik4e.cloudfront.net/download"; +in stdenv.mkDerivation (finalAttrs: { pname = "ticktick"; version = "6.0.21"; - src = fetchurl { - url = "https://d2atcrkye2ik4e.cloudfront.net/download/linux/linux_deb_x64/ticktick-${finalAttrs.version}-amd64.deb"; - hash = "sha256-e5N20FL2c6XdkDax0SMGigLuatXKZxb9c53sqQ5XVtM="; - }; + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchurl { + url = "${baseUrl}/linux/linux_deb_x64/ticktick-${finalAttrs.version}-amd64.deb"; + hash = "sha256-e5N20FL2c6XdkDax0SMGigLuatXKZxb9c53sqQ5XVtM="; + } + else if stdenv.hostPlatform.system == "aarch64-linux" then + fetchurl { + url = "${baseUrl}/linux/linux_deb_arm64/ticktick-${finalAttrs.version}-arm64.deb"; + hash = "sha256-6/nzPL+TeEE31S0ngmsUFPZEfWtt4PVAEkMqSa8OpYI="; + } + else + throw "Unsupported system: ${stdenv.hostPlatform.system}"; nativeBuildInputs = [ wrapGAppsHook3 @@ -40,9 +52,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # Needed to make the process get past zygote_linux fork()'ing - runtimeDependencies = [ - systemd - ]; + runtimeDependencies = [ systemd ]; unpackPhase = '' runHook preUnpack @@ -71,8 +81,14 @@ stdenv.mkDerivation (finalAttrs: { description = "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" ]; + maintainers = with maintainers; [ + hbjydev + jonocodes + ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; })