From b4c8a38c0fc6196ba9a0d8c27ec19f805cbafd7d Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MikaelFangel@users.noreply.github.com> Date: Sat, 9 Dec 2023 00:48:23 +0100 Subject: [PATCH] nwjs: add NIXOS_OZONE_WL --- pkgs/development/tools/nwjs/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/nwjs/default.nix b/pkgs/development/tools/nwjs/default.nix index cb230651e0b3..f88dc1f3f905 100644 --- a/pkgs/development/tools/nwjs/default.nix +++ b/pkgs/development/tools/nwjs/default.nix @@ -21,6 +21,7 @@ , libuuid , libxcb , libxkbcommon +, makeWrapper , mesa , nspr , nss @@ -30,6 +31,7 @@ , stdenv , systemd , udev +, wrapGAppsHook , xorg }: @@ -101,10 +103,20 @@ stdenv.mkDerivation { }."${flavor + bits}"; }; - nativeBuildInputs = [ autoPatchelfHook ]; + nativeBuildInputs = [ + autoPatchelfHook + (wrapGAppsHook.override { inherit makeWrapper; }) + ]; + buildInputs = [ nwEnv ]; appendRunpaths = map (pkg: (lib.getLib pkg) + "/lib") [ nwEnv stdenv.cc.libc stdenv.cc.cc ]; + preFixup = '' + gappsWrapperArgs+=( + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + ) + ''; + installPhase = '' runHook preInstall