3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix

51 lines
1.6 KiB
Nix
Raw Normal View History

2020-02-21 15:25:21 +00:00
{ stdenv, fetchurl, xdg_utils, dpkg, makeWrapper, autoPatchelfHook
, libXtst, libXScrnSaver, gtk3, nss, alsaLib, udev, libnotify
}:
2016-10-03 14:24:35 +01:00
2016-10-12 07:54:47 +01:00
let
2020-02-21 15:25:21 +00:00
version = "0.7.3";
in stdenv.mkDerivation rec {
pname = "rambox";
inherit version;
src = {
x86_64-linux = fetchurl {
url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-amd64.deb";
sha256 = "09v8zlayas906zhqy2aw4wkvyl87ykr09sjf0nmgmf69piwmjgg6";
};
2020-02-21 15:25:21 +00:00
i686-linux = fetchurl {
url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-i386.deb";
sha256 = "0gv4pf3vhrw4xyccm24ivv92d9qy4zpwsh0m82ib1w764lyxmyrz";
};
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
2017-09-07 19:10:50 +01:00
2020-02-21 15:25:21 +00:00
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook ];
buildInputs = [ libXtst libXScrnSaver gtk3 nss alsaLib ];
runtimeDependencies = [ udev.lib libnotify ];
2016-10-03 14:24:35 +01:00
2020-02-21 15:25:21 +00:00
unpackPhase = "dpkg-deb -x $src .";
2017-11-02 15:49:28 +00:00
installPhase = ''
2020-02-21 15:25:21 +00:00
mkdir -p $out/bin
cp -r opt $out
ln -s $out/opt/Rambox/rambox $out/bin
# provide resources
cp -r usr/share $out
substituteInPlace $out/share/applications/rambox.desktop \
--replace Exec=/opt/Rambox/rambox Exec=rambox
'';
postFixup = ''
2020-02-21 15:25:21 +00:00
wrapProgram $out/opt/Rambox/rambox --prefix PATH : ${xdg_utils}/bin
'';
2020-02-21 15:25:21 +00: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;
maintainers = [ maintainers.gnidorah ];
platforms = ["i686-linux" "x86_64-linux"];
hydraPlatforms = [];
2020-01-15 18:16:59 +00:00
};
2016-10-03 14:24:35 +01:00
}