2021-06-10 02:57:09 +00:00
|
|
|
{ stdenv, lib, fetchurl, alsa-lib, atk, cairo, cups, udev, libdrm, mesa
|
2019-10-28 08:19:11 +00:00
|
|
|
, dbus, expat, fontconfig, freetype, gdk-pixbuf, glib, gtk3, libappindicator-gtk3
|
2019-02-26 11:45:54 +00:00
|
|
|
, libnotify, nspr, nss, pango, systemd, xorg, autoPatchelfHook, wrapGAppsHook
|
2019-04-17 00:38:26 +00:00
|
|
|
, runtimeShell, gsettings-desktop-schemas }:
|
2017-02-14 08:10:42 +00:00
|
|
|
|
|
|
|
let
|
2021-07-14 00:19:32 +00:00
|
|
|
versionSuffix = "20210623205749.763227b4c6";
|
2018-11-25 01:19:34 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "keybase-gui";
|
2021-07-14 00:19:32 +00:00
|
|
|
version = "5.7.1"; # Find latest version from https://prerelease.keybase.io/deb/dists/stable/main/binary-amd64/Packages
|
2018-11-25 01:19:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-07-29 04:50:37 +00:00
|
|
|
|
2018-11-25 01:19:34 +00:00
|
|
|
url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version + "-" + versionSuffix}_amd64.deb";
|
2021-07-14 00:19:32 +00:00
|
|
|
sha256 = "0ajpkidbzfwhi7q018wriws0n3amcy9g3mfiqm13cpz0q6vkjx83";
|
2018-11-25 01:19:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2017-02-14 08:10:42 +00:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2019-05-22 11:03:39 +00:00
|
|
|
gdk-pixbuf
|
2017-02-14 08:10:42 +00:00
|
|
|
glib
|
2019-04-17 00:38:26 +00:00
|
|
|
gsettings-desktop-schemas
|
2018-06-28 15:57:49 +00:00
|
|
|
gtk3
|
2019-10-28 08:19:11 +00:00
|
|
|
libappindicator-gtk3
|
2018-03-24 19:28:13 +00:00
|
|
|
libnotify
|
2017-02-14 08:10:42 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
|
|
|
systemd
|
|
|
|
xorg.libX11
|
2018-11-25 01:19:34 +00:00
|
|
|
xorg.libXScrnSaver
|
2017-02-14 08:10:42 +00:00
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
2018-11-25 01:19:34 +00:00
|
|
|
xorg.libxcb
|
2021-04-21 19:42:13 +00:00
|
|
|
libdrm
|
|
|
|
mesa.out
|
2017-02-14 08:10:42 +00:00
|
|
|
];
|
2018-11-25 01:19:34 +00:00
|
|
|
|
|
|
|
runtimeDependencies = [
|
2020-08-12 18:30:12 +00:00
|
|
|
(lib.getLib udev)
|
2019-10-28 08:19:11 +00:00
|
|
|
libappindicator-gtk3
|
2018-11-25 01:19:34 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
2019-07-23 10:32:11 +00:00
|
|
|
dontPatchELF = true;
|
2018-11-25 01:19:34 +00:00
|
|
|
|
2017-02-14 08:10:42 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
ar xf $src
|
|
|
|
tar xf data.tar.xz
|
|
|
|
'';
|
2018-11-25 01:19:34 +00:00
|
|
|
|
2017-02-14 08:10:42 +00:00
|
|
|
installPhase = ''
|
2018-02-04 00:44:22 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mv usr/share $out/share
|
2017-02-14 08:10:42 +00:00
|
|
|
mv opt/keybase $out/share/
|
|
|
|
|
|
|
|
cat > $out/bin/keybase-gui <<EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2017-02-14 08:10:42 +00: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 15:47:55 +00: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 08:10:42 +00:00
|
|
|
checkFailed
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec $out/share/keybase/Keybase "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/keybase-gui
|
2018-02-04 00:44:22 +00:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/keybase.desktop \
|
|
|
|
--replace run_keybase $out/bin/keybase-gui
|
2017-02-14 08:10:42 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.keybase.io/";
|
2018-11-25 01:19:34 +00:00
|
|
|
description = "The Keybase official GUI";
|
2020-05-30 12:17:17 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ avaq rvolosatovs puffnfresh np Br1ght0ne ];
|
2018-08-09 09:00:30 +00:00
|
|
|
license = licenses.bsd3;
|
2017-02-14 08:10:42 +00:00
|
|
|
};
|
|
|
|
}
|