From 597a204ef75acede9a744bd1c259e0c8f421175f Mon Sep 17 00:00:00 2001 From: Vinetos Date: Mon, 19 Feb 2024 17:05:49 +0100 Subject: [PATCH] kchat: init at 2.4.0 --- pkgs/by-name/kc/kchat/package.nix | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/by-name/kc/kchat/package.nix diff --git a/pkgs/by-name/kc/kchat/package.nix b/pkgs/by-name/kc/kchat/package.nix new file mode 100644 index 000000000000..bb806d5aa0a3 --- /dev/null +++ b/pkgs/by-name/kc/kchat/package.nix @@ -0,0 +1,43 @@ +{ lib +, fetchurl +, appimageTools +}: + +appimageTools.wrapType2 rec { + pname = "kchat"; + version = "2.4.0"; + + src = fetchurl { + url = "https://download.storage5.infomaniak.com/kchat/kchat-desktop-${version}-linux-x86_64.AppImage"; + name = "kchat-${version}.AppImage"; + hash = "sha256-8mkkHod7iBhHVAL/vQCVnmwVlPGikdHhtiEaFVIayrU="; + }; + + extraInstallCommands = + let + contents = appimageTools.extractType2 { inherit pname version src; }; + in + '' + mkdir -p "$out/share/applications" + mkdir -p "$out/share/lib/kchat" + cp -r ${contents}/{locales,resources} "$out/share/lib/kchat" + cp -r ${contents}/usr/* "$out" + cp "${contents}/kchat-desktop.desktop" "$out/share/applications/" + mv "$out/bin/kchat-${version}" "$out/bin/${meta.mainProgram}" + substituteInPlace $out/share/applications/kchat-desktop.desktop --replace 'Exec=AppRun' 'Exec=${meta.mainProgram}' + ''; + + meta = with lib; { + description = "Instant messaging service part of Infomaniak KSuite"; + homepage = "https://www.infomaniak.com/en/apps/download-kchat"; + license = licenses.unfree; + maintainers = [ maintainers.vinetos ]; + mainProgram = "kchat"; + platforms = [ "x86_64-linux" ]; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + longDescription = '' + kChat is an instant messaging service which enables you to discuss, share and coordinate your teams in complete + security via your Internet browser, mobile phone, tablet or computer. + ''; + }; +}