nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix

89 lines
2.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, xorg, freetype, fontconfig, openssl, glib, nss, nspr, expat
, alsa-lib, dbus, zlib, libxml2, libxslt, makeWrapper, xkeyboard_config, systemd
2021-02-01 08:05:09 +00:00
, libGL, xcbutilkeysyms, xdg-utils, libtool }:
let
2018-08-23 13:54:48 +00:00
version = "4.30.5.1682";
2021-01-15 05:42:41 +00:00
rpath = lib.makeLibraryPath [
2021-02-01 08:05:09 +00:00
xdg-utils
xorg.libXext
xorg.libSM
xorg.libICE
xorg.libX11
2016-03-17 11:31:06 +00:00
xorg.libXrandr
xorg.libXdamage
xorg.libXrender
xorg.libXfixes
xorg.libXcomposite
2016-03-17 11:31:06 +00:00
xorg.libXcursor
xorg.libxcb
xorg.libXi
2016-03-17 11:31:06 +00:00
xorg.libXScrnSaver
xorg.libXtst
freetype
fontconfig
openssl
2014-05-26 22:48:30 +00:00
glib
2016-03-17 11:31:06 +00:00
nss
nspr
2014-05-26 22:48:30 +00:00
dbus
alsa-lib
2014-05-26 22:48:30 +00:00
zlib
libtool
2014-05-26 22:48:30 +00:00
libxml2
libxslt
2016-03-17 11:31:06 +00:00
expat
2014-09-15 14:01:32 +00:00
xcbutilkeysyms
2016-03-17 11:31:06 +00:00
systemd
libGL
2016-04-30 20:56:43 +00:00
] + ":${stdenv.cc.cc.lib}/lib64";
2018-07-05 12:33:42 +00:00
in stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "hipchat";
inherit version;
2018-07-05 12:33:42 +00:00
src = fetchurl {
2020-12-17 22:55:55 +00:00
url = "https://atlassian.artifactoryonline.com/artifactory/hipchat-apt-client/pool/HipChat4-${version}-Linux.deb";
2018-08-23 13:54:48 +00:00
sha256 = "03pz8wskafn848yvciq29kwdvqcgjrk6sjnm8nk9acl89xf0sn96";
2018-07-05 12:33:42 +00:00
};
2014-05-26 22:48:30 +00:00
nativeBuildInputs = [ makeWrapper ];
2014-05-26 22:48:30 +00:00
buildCommand = ''
2016-03-17 11:31:06 +00:00
ar x $src
tar xfvz data.tar.gz
2014-05-26 22:48:30 +00:00
2016-03-17 11:31:06 +00:00
mkdir -p $out/libexec/hipchat
d=$out/libexec/hipchat/lib
2016-03-17 11:31:06 +00:00
mv opt/HipChat4/* $out/libexec/hipchat/
mv usr/share $out
2014-05-26 22:48:30 +00:00
for file in $(find $d -type f); do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file || true
2016-03-17 11:31:06 +00:00
patchelf --set-rpath ${rpath}:$out/libexec/hipchat/lib:\$ORIGIN $file || true
done
2014-05-26 22:48:30 +00:00
2016-04-05 00:02:42 +00:00
patchShebangs $d/linuxbrowserlaunch.sh
2016-03-17 11:31:06 +00:00
substituteInPlace $out/share/applications/hipchat4.desktop \
--replace /opt/HipChat4/bin/HipChat4 $out/bin/hipchat
2014-05-26 22:48:30 +00:00
2016-03-17 11:31:06 +00:00
makeWrapper $d/HipChat.bin $out/bin/hipchat \
--run 'export HIPCHAT_LD_LIBRARY_PATH=$LD_LIBRARY_PATH' \
--run 'export HIPCHAT_QT_PLUGIN_PATH=$QT_PLUGIN_PATH' \
2016-03-17 11:31:06 +00:00
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
--set QTWEBENGINEPROCESS_PATH $d/QtWebEngineProcess
2014-05-26 22:48:30 +00:00
2016-03-17 11:31:06 +00:00
makeWrapper $d/QtWebEngineProcess.bin $d/QtWebEngineProcess \
--set QT_PLUGIN_PATH "$d/plugins"
'';
meta = with lib; {
description = "Desktop client for HipChat services";
homepage = "http://www.hipchat.com";
2015-05-18 11:15:50 +00:00
license = licenses.unfree;
2016-03-17 11:31:06 +00:00
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ puffnfresh ];
};
}