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

53 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, xdg_utils, dpkg, makeWrapper, autoPatchelfHook
2020-07-19 05:02:08 +00:00
, libXtst, libXScrnSaver, gtk3, nss, alsaLib, udev, libnotify, wrapGAppsHook
2020-02-21 15:25:21 +00:00
}:
2016-10-03 13:24:35 +00:00
2016-10-12 06:54:47 +00:00
let
2020-10-10 04:29:43 +00:00
version = "0.7.7";
2020-02-21 15:25:21 +00:00
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";
2020-10-10 04:29:43 +00:00
sha256 = "0bij4f1bkg94gc8pq7r6yfym5zcvwc2ymdnmnmh5m4h1pa1gk6x9";
};
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";
2020-10-10 04:29:43 +00:00
sha256 = "1nhgqjha10jvyf9nsghvlkibg7byj8qz140639ygag9qlpd51rfs";
2020-02-21 15:25:21 +00:00
};
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
2017-09-07 18:10:50 +00:00
2020-07-19 05:02:08 +00:00
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
2020-02-21 15:25:21 +00:00
buildInputs = [ libXtst libXScrnSaver gtk3 nss alsaLib ];
runtimeDependencies = [ (lib.getLib udev) libnotify ];
2016-10-03 13:24:35 +00: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
'';
2020-07-23 05:04:00 +00:00
preFixup = ''
gappsWrapperArgs+=(
--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 = "https://rambox.pro";
2020-02-21 15:25:21 +00:00
license = licenses.mit;
maintainers = with maintainers; [ gnidorah ma27 ];
2020-02-21 15:25:21 +00:00
platforms = ["i686-linux" "x86_64-linux"];
hydraPlatforms = [];
2020-01-15 18:16:59 +00:00
};
2016-10-03 13:24:35 +00:00
}