diff options
Diffstat (limited to 'pkgs/applications/graphics/figma-linux/default.nix')
-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 ''; |