ripcord: init at 0.4.23

This commit is contained in:
Tony Olagbaiye 2020-02-23 22:03:22 +00:00 committed by Silvan Mosberger
parent 6e103b062e
commit 70fe917d26
No known key found for this signature in database
GPG key ID: E8F1E9EAD284E17D
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,69 @@
{ lib, mkDerivation, fetchurl, makeFontsConf, appimageTools,
qtbase, qtsvg, qtmultimedia, qtwebsockets, qtimageformats,
autoPatchelfHook, desktop-file-utils, imagemagick, makeWrapper,
twemoji-color-font, xorg, libsodium, libopus, libGL, zlib, alsaLib }:
mkDerivation rec {
pname = "ripcord";
version = "0.4.23";
src = let
appimage = fetchurl {
url = "https://cancel.fm/dl/Ripcord-${version}-x86_64.AppImage";
sha256 = "0395w0pwr1cz8ichcbyrsscmm2p7srgjk4vkqvqgwyx41prm0x2h";
name = "${pname}-${version}.AppImage";
};
in appimageTools.extract {
name = "${pname}-${version}";
src = appimage;
};
nativeBuildInputs = [ autoPatchelfHook desktop-file-utils imagemagick ];
buildInputs = [ libsodium libopus libGL alsaLib ] ++
[ qtbase qtsvg qtmultimedia qtwebsockets qtimageformats ] ++
(with xorg; [ libX11 libXScrnSaver libXcursor xkeyboardconfig ]);
fontsConf = makeFontsConf {
fontDirectories = [ twemoji-color-font ];
};
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ${src}/{qt.conf,translations,twemoji.ripdb} $out
for size in 16 32 48 64 72 96 128 192 256 512 1024; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert -resize "$size"x"$size" ${src}/Ripcord_Icon.png $out/share/icons/hicolor/"$size"x"$size"/apps/ripcord.png
done
desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value ripcord \
--set-key Icon --set-value ripcord \
--set-key Comment --set-value "${meta.description}" \
${src}/Ripcord.desktop
mv $out/share/applications/Ripcord.desktop $out/share/applications/ripcord.desktop
install -Dm755 ${src}/Ripcord $out/Ripcord
patchelf --replace-needed libsodium.so.18 libsodium.so $out/Ripcord
makeQtWrapper $out/Ripcord $out/bin/ripcord \
--run "cd $out" \
--set FONTCONFIG_FILE "${fontsConf}" \
--prefix LD_LIBRARY_PATH ":" "${xorg.libXcursor}/lib" \
--prefix QT_XKB_CONFIG_ROOT ":" "${xorg.xkeyboardconfig}/share/X11/xkb"
runHook postInstall
'';
meta = with lib; {
description = "Desktop chat client for Slack and Discord";
homepage = "https://cancel.fm/ripcord/";
# See: https://cancel.fm/ripcord/shareware-redistribution/
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ infinisil ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -21373,6 +21373,8 @@ in
ries = callPackage ../applications/science/math/ries { };
ripcord = qt5.callPackage ../applications/networking/instant-messengers/ripcord { };
ripser = callPackage ../applications/science/math/ripser { };
rkt = callPackage ../applications/virtualization/rkt { };