From 871d8e2ef8bb4c6f5ab9d3d5483eb96404596c44 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 21 Dec 2024 12:52:46 -0600 Subject: [PATCH] talk --- pkgs_pr/talk.nix | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pkgs_pr/talk.nix b/pkgs_pr/talk.nix index bead727..054137c 100644 --- a/pkgs_pr/talk.nix +++ b/pkgs_pr/talk.nix @@ -1,8 +1,11 @@ { lib, stdenv, + fetchurl, fetchzip, autoPatchelfHook, + copyDesktopItems, + makeDesktopItem, nss, cairo, xorg, @@ -31,7 +34,14 @@ stdenv.mkDerivation (finalAttrs: { stripRoot = false; }; - nativeBuildInputs = [ autoPatchelfHook ]; + icon = fetchurl { + url = "https://raw.githubusercontent.com/nextcloud/talk-desktop/refs/tags/v1.0.0/img/icons/icon.png"; + hash = "sha256-DteSSuxIs0ukIJrvUO/3Mrh5F2GG5UAVvGRZUuZonkg="; + }; + nativeBuildInputs = [ + autoPatchelfHook + copyDesktopItems + ]; buildInputs = [ @@ -61,6 +71,18 @@ stdenv.mkDerivation (finalAttrs: { # Fixes `Zygote could not fork` runtimeDependencies = [ systemd ]; + desktopItems = [ + (makeDesktopItem { + type = "Application"; + name = "nextcloud-talk-desktop"; + desktopName = "Nextcloud Talk"; + comment = finalAttrs.meta.description; + exec = finalAttrs.meta.mainProgram; + icon = "nextcloud-talk-desktop"; + categories = [ "Chat" ]; + }) + ]; + preInstall = '' mkdir -p $out/bin mkdir -p $out/opt @@ -73,6 +95,8 @@ stdenv.mkDerivation (finalAttrs: { # Link the application in $out/bin away from contents of `preInstall` ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/nextcloud-talk-desktop + mkdir -p $out/share/icons/hicolor/512x512/apps + cp $icon $out/share/icons/hicolor/512x512/apps/nextcloud-talk-desktop.png runHook postInstall '';