2018-07-17 22:11:16 +02:00
|
|
|
{ stdenv, fetchurl, binutils, patchelf, makeWrapper
|
2019-05-22 13:03:39 +02:00
|
|
|
, expat, xorg, gdk-pixbuf, glib, gnome2, cairo, atk, freetype
|
2018-07-17 22:11:16 +02:00
|
|
|
, fontconfig, dbus, nss, nspr, gtk2-x11, alsaLib, cups, libpulseaudio, udev }:
|
2018-01-05 12:11:52 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "inboxer-${version}";
|
2018-10-28 02:07:16 +02:00
|
|
|
version = "1.2.1";
|
2018-01-05 12:11:52 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Unofficial, free and open-source Google Inbox Desktop App";
|
|
|
|
homepage = "https://denysdovhan.com/inboxer";
|
|
|
|
maintainers = [ maintainers.mgttlinger ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
|
2018-01-06 12:31:54 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/denysdovhan/inboxer/releases/download/v${version}/inboxer_${version}_amd64.deb";
|
2018-10-28 02:07:16 +02:00
|
|
|
sha256 = "0nyxas07d6ckgjazxapmc6iyakd2cddla6wflr5rhfp78d7kax3a";
|
2018-01-05 12:11:52 +01:00
|
|
|
};
|
|
|
|
|
2018-01-06 12:31:54 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
ar p $src data.tar.xz | tar xJ
|
|
|
|
'';
|
2018-09-27 23:38:10 +02:00
|
|
|
nativeBuildInputs = [ patchelf makeWrapper ];
|
|
|
|
buildInputs = [ binutils ];
|
2018-01-05 12:11:52 +01:00
|
|
|
|
2018-01-06 12:31:54 +01:00
|
|
|
preFixup = with stdenv.lib; let
|
|
|
|
lpath = makeLibraryPath [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
gtk2-x11
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libxcb
|
2019-05-22 13:03:39 +02:00
|
|
|
gdk-pixbuf
|
2018-01-06 12:31:54 +01:00
|
|
|
glib
|
|
|
|
gnome2.pango
|
|
|
|
gnome2.GConf
|
|
|
|
expat
|
|
|
|
stdenv.cc.cc.lib
|
2018-01-10 21:12:31 +01:00
|
|
|
libpulseaudio
|
2018-07-17 22:11:16 +02:00
|
|
|
udev
|
2018-01-06 12:31:54 +01:00
|
|
|
];
|
|
|
|
in ''
|
2018-01-10 21:12:31 +01:00
|
|
|
patchelf \
|
|
|
|
--set-rpath "$out/opt/Inboxer:${lpath}" \
|
|
|
|
$out/opt/Inboxer/libnode.so
|
|
|
|
patchelf \
|
|
|
|
--set-rpath "$out/opt/Inboxer:${lpath}" \
|
|
|
|
$out/opt/Inboxer/libffmpeg.so
|
2018-07-17 22:11:16 +02:00
|
|
|
|
2018-01-06 12:31:54 +01:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "$out/opt/Inboxer:${lpath}" \
|
|
|
|
$out/opt/Inboxer/inboxer
|
2018-01-10 21:12:31 +01:00
|
|
|
|
|
|
|
wrapProgram $out/opt/Inboxer/inboxer --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${lpath}"
|
2018-01-06 12:31:54 +01:00
|
|
|
'';
|
2018-07-17 22:11:16 +02:00
|
|
|
|
2018-01-06 12:31:54 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -R usr/share opt $out/
|
|
|
|
# fix the path in the desktop file
|
|
|
|
substituteInPlace \
|
|
|
|
$out/share/applications/inboxer.desktop \
|
|
|
|
--replace /opt/ $out/opt/
|
|
|
|
# symlink the binary to bin/
|
|
|
|
ln -s $out/opt/Inboxer/inboxer $out/bin/inboxer
|
2018-01-05 12:11:52 +01:00
|
|
|
'';
|
|
|
|
}
|