Merge pull request #309406 from mrnossiom/fix/add-ozone-wl-flag-figma-linux
figma-linux: add NIXOS_OZONE_WL workaround
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, dpkg
|
||||
, makeWrapper
|
||||
, wrapGAppsHook3
|
||||
, ...
|
||||
}:
|
||||
@@ -17,7 +18,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-ukUsNgWOtIRe54vsmRdI62syjIPwSsgNV7kITCw0YUQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook dpkg wrapGAppsHook3 ];
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
dpkg
|
||||
makeWrapper
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = with pkgs;[
|
||||
alsa-lib
|
||||
@@ -52,6 +58,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
# Instead of double wrapping the binary, simply pass the `gappsWrapperArgs`
|
||||
# to `makeWrapper` directly
|
||||
dontWrapGApps = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@@ -60,6 +70,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cp -r usr/* $out
|
||||
|
||||
wrapProgramShell $out/bin/figma-linux \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user