Commit 5eb0c82c authored by Artturin's avatar Artturin
Browse files

vscode: run nixpkgs-fmt

parent 2afc2443
Loading
Loading
Loading
Loading
+175 −143
Original line number Diff line number Diff line
{ stdenv, lib, makeDesktopItem
, unzip, libsecret, libXScrnSaver, libxshmfence, buildPackages
, at-spi2-atk, autoPatchelfHook, alsa-lib, mesa, nss, nspr, xorg
, systemd, fontconfig, libdbusmenu, glib, buildFHSEnv, wayland
, libglvnd, libkrb5
{ stdenv
, lib
, makeDesktopItem
, unzip
, libsecret
, libXScrnSaver
, libxshmfence
, buildPackages
, at-spi2-atk
, autoPatchelfHook
, alsa-lib
, mesa
, nss
, nspr
, xorg
, systemd
, fontconfig
, libdbusmenu
, glib
, buildFHSEnv
, wayland
, libglvnd
, libkrb5

  # Populate passthru.tests
, tests

  # needed to fix "Save as Root"
, asar, bash
, asar
, bash

  # Attributes inherit from specific versions
, version, src, meta, sourceRoot, commandLineArgs
, executableName, longName, shortName, pname, updateScript
, version
, src
, meta
, sourceRoot
, commandLineArgs
, executableName
, longName
, shortName
, pname
, updateScript
, dontFixup ? false
, rev ? null, vscodeServer ? null
, rev ? null
, vscodeServer ? null
, sourceExecutableName ? executableName
, useVSCodeRipgrep ? false
, ripgrep
@@ -202,17 +230,21 @@
    # and the window immediately closes which renders VSCode unusable
    # see https://github.com/NixOS/nixpkgs/issues/152939 for full log
    ln -rs "$unpacked" "$packed"
    '' + (let
      vscodeRipgrep = if stdenv.isDarwin then
  '' + (
    let
      vscodeRipgrep =
        if stdenv.isDarwin then
          "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
        else
          "resources/app/node_modules/@vscode/ripgrep/bin/rg";
    in if !useVSCodeRipgrep then ''
    in
    if !useVSCodeRipgrep then ''
      rm ${vscodeRipgrep}
      ln -s ${ripgrep}/bin/rg ${vscodeRipgrep}
    '' else ''
      chmod +x ${vscodeRipgrep}
    '');
    ''
  );

  postFixup = lib.optionalString stdenv.isLinux ''
    patchelf --add-needed ${libglvnd}/lib/libGLESv2.so.2 $out/lib/vscode/${executableName}