2016-10-12 07:54:47 +01:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem
|
2016-10-03 14:24:35 +01:00
|
|
|
, xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
|
|
|
|
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify }:
|
|
|
|
|
2016-10-12 07:54:47 +01:00
|
|
|
let
|
2016-10-03 17:57:50 +01:00
|
|
|
bits = if stdenv.system == "x86_64-linux" then "x64"
|
|
|
|
else "ia32";
|
2016-10-12 07:54:47 +01:00
|
|
|
|
2017-01-26 08:33:47 +00:00
|
|
|
version = "0.5.3";
|
2016-10-12 07:54:47 +01:00
|
|
|
|
|
|
|
myIcon = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/saenzramiro/rambox/9e4444e6297dd35743b79fe23f8d451a104028d5/resources/Icon.png";
|
|
|
|
sha256 = "0r00l4r5mlbgn689i3rp6ks11fgs4h2flvrlggvm2qdd974d1x0b";
|
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "Rambox";
|
2017-01-26 08:33:47 +00:00
|
|
|
exec = "rambox";
|
2016-10-12 07:54:47 +01:00
|
|
|
icon = myIcon;
|
|
|
|
desktopName = name;
|
|
|
|
genericName = "Rambox messenger";
|
|
|
|
categories = "Network;";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-10-03 14:24:35 +01:00
|
|
|
name = "rambox-${version}";
|
|
|
|
src = fetchurl {
|
2016-10-03 17:57:50 +01:00
|
|
|
url = "https://github.com/saenzramiro/rambox/releases/download/${version}/Rambox-${version}-${bits}.tar.gz";
|
|
|
|
sha256 = if bits == "x64" then
|
2017-01-26 08:33:47 +00:00
|
|
|
"14pp466l0fj98p5qsb7i11hd603gwsir26m3j4gljzcizb9hirqv" else
|
|
|
|
"13xmljsdahffdzndg30qxh8mj7bgd9jwkxknrvlh3l6w35pbj085";
|
2016-10-03 14:24:35 +01:00
|
|
|
};
|
|
|
|
|
2016-11-19 15:16:18 +00:00
|
|
|
phases = [ "unpackPhase" "installPhase" "postFixup" ];
|
2016-10-03 14:24:35 +01:00
|
|
|
|
|
|
|
deps = with xorg; [
|
|
|
|
gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
|
|
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
|
|
|
libXrender libX11 libXtst libXScrnSaver gnome2.GConf nss nspr alsaLib
|
|
|
|
cups expat stdenv.cc.cc
|
|
|
|
|
|
|
|
udev libnotify
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-01-26 08:33:47 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" rambox
|
|
|
|
patchelf --set-rpath "$out/share/rambox:${stdenv.lib.makeLibraryPath deps}" rambox
|
2016-10-03 14:24:35 +01:00
|
|
|
|
|
|
|
mkdir -p $out/bin $out/share/rambox
|
|
|
|
cp -r * $out/share/rambox
|
2017-01-26 08:33:47 +00:00
|
|
|
ln -s $out/share/rambox/rambox $out/bin
|
2016-10-12 07:54:47 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
2016-10-03 14:24:35 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-19 15:16:18 +00:00
|
|
|
postFixup = ''
|
2017-01-26 08:33:47 +00:00
|
|
|
paxmark m $out/share/rambox/rambox
|
2016-11-19 15:16:18 +00:00
|
|
|
'';
|
|
|
|
|
2016-10-03 14:24:35 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Free and Open Source messaging and emailing app that combines common web applications into one";
|
|
|
|
homepage = http://rambox.pro;
|
|
|
|
license = licenses.mit;
|
2016-10-03 17:24:57 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.gnidorah ];
|
2016-10-03 17:57:50 +01:00
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
2016-10-03 17:24:57 +01:00
|
|
|
hydraPlatforms = [];
|
2016-10-03 14:24:35 +01:00
|
|
|
};
|
|
|
|
}
|