2021-08-21 18:57:52 +03:00
|
|
|
_: prev:
|
|
|
|
let
|
|
|
|
pkgs = prev;
|
|
|
|
lib = pkgs.lib;
|
|
|
|
vscodeWayland =
|
|
|
|
let
|
|
|
|
flags = [
|
|
|
|
"--flag-switches-begin"
|
2021-08-22 20:54:38 +03:00
|
|
|
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist"
|
2021-08-21 18:57:52 +03:00
|
|
|
"--flag-switches-end"
|
|
|
|
"--ozone-platform=wayland"
|
|
|
|
"--enable-webrtc-pipewire-capturer"
|
|
|
|
"--ignore-gpu-blocklist"
|
|
|
|
"--enable-gpu-rasterization"
|
|
|
|
"--enable-zero-copy"
|
|
|
|
"--disable-gpu-driver-bug-workarounds"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
pkgs.writeScriptBin "vscode-wayland" ''
|
|
|
|
#!${pkgs.stdenv.shell}
|
|
|
|
${pkgs.vscode}/bin/code ${lib.concatStringsSep " " flags}
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
vscodeWayland =
|
|
|
|
let
|
|
|
|
pname = "vscode";
|
|
|
|
desktop = pkgs.makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
exec = pname;
|
|
|
|
icon = "vscode";
|
|
|
|
desktopName = "VSCode Wayland";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.hiPrio (pkgs.stdenv.mkDerivation {
|
|
|
|
inherit pname;
|
|
|
|
version = pkgs.vscode.version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
2021-08-22 20:54:38 +03:00
|
|
|
phases = [ "installPhase" /*"fixupPhase"*/ ];
|
2021-08-21 18:57:52 +03:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname}
|
|
|
|
cp -r ${desktop}/share $out/share
|
|
|
|
'';
|
2021-08-22 20:54:38 +03:00
|
|
|
/*fixupPhase = ''
|
2021-08-21 18:57:52 +03:00
|
|
|
wrapProgram $out/bin/${pname} \
|
2021-08-22 20:54:38 +03:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-extension-layer libGL ])}
|
|
|
|
'';*/
|
2021-08-21 18:57:52 +03:00
|
|
|
});
|
|
|
|
}
|