3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #141362 from gbtb/packaged_rocketchat-desktop_binary

This commit is contained in:
Sandro 2021-10-19 11:29:23 +02:00 committed by GitHub
commit 9355f60603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 0 deletions

View file

@ -4094,6 +4094,12 @@
githubId = 16470252;
name = "Gemini Lasswell";
};
gbtb = {
email = "goodbetterthebeast3@gmail.com";
github = "gbtb";
githubId = 37017396;
name = "gbtb";
};
gebner = {
email = "gebner@gebner.org";
github = "gebner";

View file

@ -0,0 +1,92 @@
{ lib, stdenv, pkgs, fetchurl }:
let
libPathNative = { packages }: lib.makeLibraryPath packages;
in
stdenv.mkDerivation rec {
pname = "rocketchat-desktop";
version = "3.5.7";
src = fetchurl {
url = "https://github.com/RocketChat/Rocket.Chat.Electron/releases/download/${version}/rocketchat_${version}_amd64.deb";
sha256 = "1ri8a60fsbqgq83f8wkyfnd59nqk4d0gpz1vanj54769zflpl71s";
};
buildInputs = with pkgs; [
gtk3
stdenv.cc.cc
zlib
glib
dbus
atk
pango
freetype
libgnome-keyring3
fontconfig
gdk-pixbuf
cairo
cups
expat
libgpgerror
alsa-lib
nspr
nss
xorg.libXrender
xorg.libX11
xorg.libXext
xorg.libXdamage
xorg.libXtst
xorg.libXcomposite
xorg.libXi
xorg.libXfixes
xorg.libXrandr
xorg.libXcursor
xorg.libxkbfile
xorg.libXScrnSaver
systemd
libnotify
xorg.libxcb
at-spi2-atk
at-spi2-core
libdbusmenu
libdrm
mesa
xorg.libxshmfence
libxkbcommon
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
ar p $src data.tar.xz | tar xJ ./opt/ ./usr/
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv opt $out
mv usr/share $out
ln -s $out/opt/Rocket.Chat/rocketchat-desktop $out/bin/rocketchat-desktop
runHook postInstall
'';
postFixup =
let
libpath = libPathNative { packages = buildInputs; };
in
''
app=$out/opt/Rocket.Chat
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libpath}:$app" \
$app/rocketchat-desktop
sed -i -e "s|Exec=.*$|Exec=$out/bin/rocketchat-desktop|" $out/share/applications/rocketchat-desktop.desktop
'';
meta = with lib; {
description = "Official Desktop client for Rocket.Chat";
homepage = "https://github.com/RocketChat/Rocket.Chat.Electron";
license = licenses.mit;
maintainers = with maintainers; [ gbtb ];
platforms = platforms.x86_64;
};
}

View file

@ -27509,6 +27509,8 @@ with pkgs;
rkdeveloptool = callPackage ../misc/rkdeveloptool { };
rocketchat-desktop = callPackage ../applications/networking/instant-messengers/rocketchat-desktop { };
rofi-unwrapped = callPackage ../applications/misc/rofi {
autoreconfHook = buildPackages.autoreconfHook269;
};