diff options
author | Masum Reza <50095635+JohnRTitor@users.noreply.github.com> | 2024-06-23 01:25:46 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-23 01:25:46 +0530 |
commit | a13270c5529e445af4b48eea0c836b780a195909 (patch) | |
tree | a78a26949f9a4133bdd1f44a03a90795d902090e /pkgs/applications/graphics/figma-linux | |
parent | 9693852a2070b398ee123a329e68f0dab5526681 (diff) | |
parent | fb609d558bdc475755dc138015fe42d02a403406 (diff) |
Merge pull request #309406 from mrnossiom/fix/add-ozone-wl-flag-figma-linux
figma-linux: add NIXOS_OZONE_WL workaround
Diffstat (limited to 'pkgs/applications/graphics/figma-linux')
-rw-r--r-- | pkgs/applications/graphics/figma-linux/default.nix | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/figma-linux/default.nix b/pkgs/applications/graphics/figma-linux/default.nix index 55583cd188090..72f5ed882c401 100644 --- a/pkgs/applications/graphics/figma-linux/default.nix +++ b/pkgs/applications/graphics/figma-linux/default.nix @@ -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 ''; |