2016-03-17 12:31:06 +01:00
|
|
|
{ stdenv, fetchurl, xorg, freetype, fontconfig, openssl, glib, nss, nspr, expat
|
|
|
|
, alsaLib, dbus, zlib, libxml2, libxslt, makeWrapper, xkeyboard_config, systemd
|
2016-09-08 13:04:13 +02:00
|
|
|
, mesa_noglu, xcbutilkeysyms, xdg_utils, libtool }:
|
2013-04-11 20:42:32 +02:00
|
|
|
|
|
|
|
let
|
2014-05-27 00:48:30 +02:00
|
|
|
|
2016-12-06 09:46:33 +01:00
|
|
|
version = "4.29.4.1662";
|
2013-04-11 20:42:32 +02:00
|
|
|
|
2016-04-13 14:53:51 +02:00
|
|
|
rpath = stdenv.lib.makeLibraryPath [
|
2016-05-18 15:23:01 +02:00
|
|
|
xdg_utils
|
2015-09-15 11:26:18 +02:00
|
|
|
xorg.libXext
|
|
|
|
xorg.libSM
|
|
|
|
xorg.libICE
|
|
|
|
xorg.libX11
|
2016-03-17 12:31:06 +01:00
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXdamage
|
2015-09-15 11:26:18 +02:00
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXcomposite
|
2016-03-17 12:31:06 +01:00
|
|
|
xorg.libXcursor
|
2015-09-15 11:26:18 +02:00
|
|
|
xorg.libxcb
|
|
|
|
xorg.libXi
|
2016-03-17 12:31:06 +01:00
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXtst
|
2013-04-11 20:42:32 +02:00
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
openssl
|
2014-05-27 00:48:30 +02:00
|
|
|
glib
|
2016-03-17 12:31:06 +01:00
|
|
|
nss
|
|
|
|
nspr
|
2014-05-27 00:48:30 +02:00
|
|
|
dbus
|
|
|
|
alsaLib
|
|
|
|
zlib
|
2016-09-08 13:04:13 +02:00
|
|
|
libtool
|
2014-05-27 00:48:30 +02:00
|
|
|
libxml2
|
|
|
|
libxslt
|
2016-03-17 12:31:06 +01:00
|
|
|
expat
|
2014-09-15 16:01:32 +02:00
|
|
|
xcbutilkeysyms
|
2016-03-17 12:31:06 +01:00
|
|
|
systemd
|
|
|
|
mesa_noglu
|
2016-04-30 22:56:43 +02:00
|
|
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
2013-04-11 20:42:32 +02:00
|
|
|
|
2014-05-27 00:48:30 +02:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2016-03-17 12:31:06 +01:00
|
|
|
url = "https://atlassian.artifactoryonline.com/atlassian/hipchat-apt-client/pool/HipChat4-${version}-Linux.deb";
|
2016-12-06 09:46:33 +01:00
|
|
|
sha256 = "1cz9zv9aj8xdrjs6dgi7fpm4q9l9find4m8l0nmvac2s4r60vw6y";
|
2014-05-27 00:48:30 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw "HipChat is not supported on ${stdenv.system}";
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-04-11 20:42:32 +02:00
|
|
|
name = "hipchat-${version}";
|
|
|
|
|
2014-05-27 00:48:30 +02:00
|
|
|
inherit src;
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2013-04-11 20:42:32 +02:00
|
|
|
buildCommand = ''
|
2016-03-17 12:31:06 +01:00
|
|
|
ar x $src
|
|
|
|
tar xfvz data.tar.gz
|
2014-05-27 00:48:30 +02:00
|
|
|
|
2016-03-17 12:31:06 +01:00
|
|
|
mkdir -p $out/libexec/hipchat
|
2014-05-27 01:00:04 +02:00
|
|
|
d=$out/libexec/hipchat/lib
|
2016-03-17 12:31:06 +01:00
|
|
|
mv opt/HipChat4/* $out/libexec/hipchat/
|
2013-04-11 20:42:32 +02:00
|
|
|
mv usr/share $out
|
2014-05-27 00:48:30 +02:00
|
|
|
|
|
|
|
for file in $(find $d -type f); do
|
2014-12-17 19:11:30 +01:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file || true
|
2016-03-17 12:31:06 +01:00
|
|
|
patchelf --set-rpath ${rpath}:$out/libexec/hipchat/lib:\$ORIGIN $file || true
|
2013-04-11 20:42:32 +02:00
|
|
|
done
|
2014-05-27 00:48:30 +02:00
|
|
|
|
2016-04-05 02:02:42 +02:00
|
|
|
patchShebangs $d/linuxbrowserlaunch.sh
|
|
|
|
|
2016-03-17 12:31:06 +01:00
|
|
|
substituteInPlace $out/share/applications/hipchat4.desktop \
|
|
|
|
--replace /opt/HipChat4/bin/HipChat4 $out/bin/hipchat
|
2014-05-27 00:48:30 +02:00
|
|
|
|
2016-03-17 12:31:06 +01:00
|
|
|
makeWrapper $d/HipChat.bin $out/bin/hipchat \
|
2014-05-27 00:48:30 +02:00
|
|
|
--set HIPCHAT_LD_LIBRARY_PATH '"$LD_LIBRARY_PATH"' \
|
2014-05-27 01:00:04 +02:00
|
|
|
--set HIPCHAT_QT_PLUGIN_PATH '"$QT_PLUGIN_PATH"' \
|
2016-03-17 12:31:06 +01:00
|
|
|
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
|
|
|
|
--set QTWEBENGINEPROCESS_PATH $d/QtWebEngineProcess
|
2014-05-27 00:48:30 +02:00
|
|
|
|
2016-03-17 12:31:06 +01:00
|
|
|
makeWrapper $d/QtWebEngineProcess.bin $d/QtWebEngineProcess \
|
|
|
|
--set QT_PLUGIN_PATH "$d/plugins"
|
2013-04-11 20:42:32 +02:00
|
|
|
'';
|
|
|
|
|
2015-05-18 13:15:50 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Desktop client for HipChat services";
|
2013-04-11 20:42:32 +02:00
|
|
|
homepage = http://www.hipchat.com;
|
2015-05-18 13:15:50 +02:00
|
|
|
license = licenses.unfree;
|
2016-03-17 12:31:06 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ jgeerds puffnfresh ];
|
2013-04-11 20:42:32 +02:00
|
|
|
};
|
|
|
|
}
|