keybase-gui: 2.7.0 -> 2.11.0

- Use `autoPatchelfHook`
- Don't explicitly set phases - Part of #28910
- Correct `version` by hoisting out the suffix
This commit is contained in:
worldofpeace 2018-11-24 20:19:34 -05:00
parent ed99c2266f
commit 02e9d06e5e
1 changed files with 35 additions and 20 deletions

View File

@ -1,9 +1,26 @@
{ stdenv, fetchurl, alsaLib, atk, cairo, cups { stdenv, fetchurl, alsaLib, atk, cairo, cups, udev, hicolor-icon-theme
, dbus, expat, fontconfig, freetype, gcc, gdk_pixbuf, glib, gnome2, gtk3 , dbus, expat, fontconfig, freetype, gdk_pixbuf, glib, gnome2, gtk3, gnome3
, libnotify, nspr, nss, pango, systemd, xorg }: , libnotify, nspr, nss, pango, systemd, xorg, autoPatchelfHook, wrapGAppsHook }:
let let
libPath = stdenv.lib.makeLibraryPath [ versionSuffix = "20181121195344.99751ac04f";
in
stdenv.mkDerivation rec {
name = "keybase-gui-${version}";
version = "2.11.0"; # Find latest version from https://prerelease.keybase.io/deb/dists/stable/main/binary-amd64/Packages
src = fetchurl {
url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version + "-" + versionSuffix}_amd64.deb";
sha256 = "1gh7brdw2p4xfdgc43vrmv0lvki2f3691mfh6lvksy1dv43yb8zl";
};
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook
];
buildInputs = [
alsaLib alsaLib
atk atk
cairo cairo
@ -12,10 +29,10 @@ let
expat expat
fontconfig fontconfig
freetype freetype
gcc.cc
gdk_pixbuf gdk_pixbuf
glib glib
gnome2.GConf gnome2.GConf
gnome3.gsettings-desktop-schemas
gtk3 gtk3
libnotify libnotify
nspr nspr
@ -23,7 +40,7 @@ let
pango pango
systemd systemd
xorg.libX11 xorg.libX11
xorg.libxcb xorg.libXScrnSaver
xorg.libXcomposite xorg.libXcomposite
xorg.libXcursor xorg.libXcursor
xorg.libXdamage xorg.libXdamage
@ -32,22 +49,23 @@ let
xorg.libXi xorg.libXi
xorg.libXrandr xorg.libXrandr
xorg.libXrender xorg.libXrender
xorg.libXScrnSaver
xorg.libXtst xorg.libXtst
xorg.libxcb
]; ];
in
stdenv.mkDerivation rec { runtimeDependencies = [
name = "keybase-gui-${version}"; udev.lib
version = "2.7.0-20180926133747.0d62c866fc"; ];
src = fetchurl {
url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version}_amd64.deb"; dontBuild = true;
sha256 = "0a0ax3skfw398vcjl7822qp7160lbll1snwdqsa13dy8qrjl1byp"; dontConfigure = true;
}; dontPatchElf = true;
phases = ["unpackPhase" "installPhase" "fixupPhase"];
unpackPhase = '' unpackPhase = ''
ar xf $src ar xf $src
tar xf data.tar.xz tar xf data.tar.xz
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
mv usr/share $out/share mv usr/share $out/share
@ -83,13 +101,10 @@ stdenv.mkDerivation rec {
substituteInPlace $out/share/applications/keybase.desktop \ substituteInPlace $out/share/applications/keybase.desktop \
--replace run_keybase $out/bin/keybase-gui --replace run_keybase $out/bin/keybase-gui
''; '';
postFixup = ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}:\$ORIGIN" "$out/share/keybase/Keybase"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.keybase.io/; homepage = https://www.keybase.io/;
description = "The Keybase official GUI."; description = "The Keybase official GUI";
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ puffnfresh np ]; maintainers = with maintainers; [ puffnfresh np ];
license = licenses.bsd3; license = licenses.bsd3;