anchor.diff:        '';
       };
   
  -    buildInputs = if stdenv.hostPlatform.system == "x86_64-darwin"
  -      then [ unzip libXScrnSaver libsecret ]
  -      else [ wrapGAppsHook libXScrnSaver libxkbfile libsecret ];
  +    buildInputs = (if stdenv.isDarwin
  +      then [ unzip ]
  +      else [ gtk2 at-spi2-atk wrapGAppsHook ] ++ atomEnv.packages)
  +        ++ [ libsecret libXScrnSaver ];
  +
  +    nativeBuildInputs = lib.optional (!stdenv.isDarwin) autoPatchelfHook;
   
       installPhase =
         if stdenv.hostPlatform.system == "x86_64-darwin" then ''
  
positive.code: { stdenv, lib, fetchurl, unzip, atomEnv, makeDesktopItem,
    gtk2, wrapGAppsHook, libXScrnSaver, libxkbfile, libsecret,
    isInsiders ? false }:
  
  let
    executableName = "code" + lib.optionalString isInsiders "-insiders";
  
negative.code:       '';
  
      postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") ''
        wrapProgram $out/lib/vscode/${executableName} \
          --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ systemd fontconfig ]}
  
        ln -s ${lib.makeLibraryPath [libsecret]}/libsecret-1.so.0 $out/lib/vscode/libsecret-1.so.0
      '';
  