anchor.diff:      expat
       fontconfig
       freetype
  -    gcc.cc
       gdk_pixbuf
       glib
       gnome2.GConf
  +    gnome3.gsettings-desktop-schemas
       gtk3
       libnotify
       nspr
  
positive.code:     xorg.libXi
      xorg.libXrandr
      xorg.libXrender
      xorg.libXScrnSaver
      xorg.libXtst
    ];
  in
  stdenv.mkDerivation rec {
    name = "keybase-gui-${version}";
    version = "2.7.0-20180926133747.0d62c866fc";
    src = fetchurl {
      url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version}_amd64.deb";
      sha256 = "0a0ax3skfw398vcjl7822qp7160lbll1snwdqsa13dy8qrjl1byp";
    };
    phases = ["unpackPhase" "installPhase" "fixupPhase"];
    unpackPhase = ''
      ar xf $src
      tar xf data.tar.xz
    '';
    installPhase = ''
      mkdir -p $out/bin
      mv usr/share $out/share
  
negative.code: { stdenv, fetchurl, alsaLib, atk, cairo, cups, udev, hicolor-icon-theme
  , dbus, expat, fontconfig, freetype, gdk_pixbuf, glib, gnome2, gtk3, gnome3
  , libnotify, nspr, nss, pango, systemd, xorg, autoPatchelfHook, wrapGAppsHook }:
  
  let
    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
      atk
      cairo
  