From cdd47d439ae7fda0e14b63fbe0fb9e74f34b0fc9 Mon Sep 17 00:00:00 2001 From: notohh Date: Thu, 25 May 2023 15:03:52 -0400 Subject: [PATCH] chatterino7: init desktop entry & meta --- pkgs/chatterino7/default.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkgs/chatterino7/default.nix b/pkgs/chatterino7/default.nix index 5e6a7fc..c46a6af 100644 --- a/pkgs/chatterino7/default.nix +++ b/pkgs/chatterino7/default.nix @@ -2,6 +2,8 @@ stdenv, cmake, pkgs, + lib, + makeDesktopItem, }: stdenv.mkDerivation rec { pname = "chatterino7"; @@ -25,10 +27,28 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p "$out/bin" - mv "bin/chatterino" "$out/bin" + cp "bin/chatterino" "$out/bin" '' + '' mkdir -p $out/share/icons/hicolor/256x256/apps cp $src/resources/icon.png $out/share/icons/hicolor/256x256/apps/chatterino.png ''; + postFixup = '' + mkdir -p $out/share/applications + ln -s ${desktopFile}/share/applications/* $out/share/applications + ''; + desktopFile = makeDesktopItem { + name = "Chatterino7"; + desktopName = "Chatterino7"; + exec = "chatterino"; + icon = "chatterino"; + comment = meta.description; + categories = ["Social Media"]; + }; + meta = with lib; { + description = "Chat client for twitch.tv"; + homepage = "https://github.com/SevenTV/chatterino7"; + license = licenses.mit; + maintainers = with maintainers; [notohh]; + }; }