2018-11-25 02:19:34 +01:00
|
|
|
{ stdenv, fetchurl, alsaLib, atk, cairo, cups, udev, hicolor-icon-theme
|
2019-02-08 04:15:03 +01:00
|
|
|
, dbus, expat, fontconfig, freetype, gdk_pixbuf, glib, gtk3, gnome3
|
2019-02-26 12:45:54 +01:00
|
|
|
, libnotify, nspr, nss, pango, systemd, xorg, autoPatchelfHook, wrapGAppsHook
|
2019-04-17 02:38:26 +02:00
|
|
|
, runtimeShell, gsettings-desktop-schemas }:
|
2017-02-14 09:10:42 +01:00
|
|
|
|
|
|
|
let
|
2019-05-03 18:14:51 +02:00
|
|
|
versionSuffix = "20190412141809.5262f90fd9";
|
2018-11-25 02:19:34 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "keybase-gui-${version}";
|
2019-05-03 18:14:51 +02:00
|
|
|
version = "3.2.2"; # Find latest version from https://prerelease.keybase.io/deb/dists/stable/main/binary-amd64/Packages
|
2018-11-25 02:19:34 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version + "-" + versionSuffix}_amd64.deb";
|
2019-05-03 18:14:51 +02:00
|
|
|
sha256 = "20f0cbfae52a8afbc88c1130279b2c2ced21fd498eee7e43c88f5b88abd8f21b";
|
2018-11-25 02:19:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-02-14 09:10:42 +01:00
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk_pixbuf
|
|
|
|
glib
|
2019-04-17 02:38:26 +02:00
|
|
|
gsettings-desktop-schemas
|
2018-06-28 17:57:49 +02:00
|
|
|
gtk3
|
2018-03-24 20:28:13 +01:00
|
|
|
libnotify
|
2017-02-14 09:10:42 +01:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
|
|
|
systemd
|
|
|
|
xorg.libX11
|
2018-11-25 02:19:34 +01:00
|
|
|
xorg.libXScrnSaver
|
2017-02-14 09:10:42 +01:00
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
2018-11-25 02:19:34 +01:00
|
|
|
xorg.libxcb
|
2017-02-14 09:10:42 +01:00
|
|
|
];
|
2018-11-25 02:19:34 +01:00
|
|
|
|
|
|
|
runtimeDependencies = [
|
|
|
|
udev.lib
|
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontPatchElf = true;
|
|
|
|
|
2017-02-14 09:10:42 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
ar xf $src
|
|
|
|
tar xf data.tar.xz
|
|
|
|
'';
|
2018-11-25 02:19:34 +01:00
|
|
|
|
2017-02-14 09:10:42 +01:00
|
|
|
installPhase = ''
|
2018-02-04 01:44:22 +01:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mv usr/share $out/share
|
2017-02-14 09:10:42 +01:00
|
|
|
mv opt/keybase $out/share/
|
|
|
|
|
|
|
|
cat > $out/bin/keybase-gui <<EOF
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2017-02-14 09:10:42 +01:00
|
|
|
|
|
|
|
checkFailed() {
|
|
|
|
if [ "\$NIX_SKIP_KEYBASE_CHECKS" = "1" ]; then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
echo "Set NIX_SKIP_KEYBASE_CHECKS=1 if you want to skip this check." >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ ! -S "\$XDG_RUNTIME_DIR/keybase/keybased.sock" ]; then
|
|
|
|
echo "Keybase service doesn't seem to be running." >&2
|
|
|
|
echo "You might need to run: keybase service" >&2
|
|
|
|
checkFailed
|
|
|
|
fi
|
|
|
|
|
2018-07-17 17:47:55 +02:00
|
|
|
if [ -z "\$(keybase status | grep kbfsfuse)" ]; then
|
|
|
|
echo "Could not find kbfsfuse client in keybase status." >&2
|
|
|
|
echo "You might need to run: kbfsfuse" >&2
|
2017-02-14 09:10:42 +01:00
|
|
|
checkFailed
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec $out/share/keybase/Keybase "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/keybase-gui
|
2018-02-04 01:44:22 +01:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/keybase.desktop \
|
|
|
|
--replace run_keybase $out/bin/keybase-gui
|
2017-02-14 09:10:42 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.keybase.io/;
|
2018-11-25 02:19:34 +01:00
|
|
|
description = "The Keybase official GUI";
|
2017-02-14 09:10:42 +01:00
|
|
|
platforms = platforms.linux;
|
2019-01-07 19:41:48 +01:00
|
|
|
maintainers = with maintainers; [ rvolosatovs puffnfresh np ];
|
2018-08-09 11:00:30 +02:00
|
|
|
license = licenses.bsd3;
|
2017-02-14 09:10:42 +01:00
|
|
|
};
|
|
|
|
}
|