anchor.diff:      unzip -d $out/bin $src
       patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       $out/bin/electron
  -    wrapProgram $out/bin/electron \
  -    --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
  +  '';
  +
  +  postFixup = ''
  +    patchelf \
  +    --set-rpath "${atomEnv}/lib:${atomEnv}/lib64:$out/bin:$(patchelf --print-rpath $out/bin/electron)" \
  +    $out/bin/electron
     '';
   
     meta = with stdenv.lib; {
  
positive.code: { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
  , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
  , cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, unzip
  , systemd, libnotify
  }:
  let
    atomEnv = buildEnv {
  
negative.code:   };
  in stdenv.mkDerivation rec {
    name = "electron-${version}";
    inherit version;
  
    src = fetchurl {
      url = "https://github.com/atom/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
      inherit sha256;
      name = "${name}.zip";
    };
  
    buildInputs = [ atomEnv unzip ];
  
    phases = [ "installPhase" "fixupPhase" ];
  
  