12 stdenv.mkDerivation (finalAttrs: {
13 pname = "figma-linux";
17 url = "https://github.com/Figma-Linux/figma-linux/releases/download/v${finalAttrs.version}/figma-linux_${finalAttrs.version}_linux_amd64.deb";
18 hash = "sha256-6lFeiecliyuTdnUCCbLpoQWiu5k3OPHxb+VF17GtERo=";
58 runtimeDependencies = with pkgs; [ eudev ];
60 unpackCmd = "dpkg -x $src .";
64 # Instead of double wrapping the binary, simply pass the `gappsWrapperArgs`
65 # to `makeWrapper` directly
71 mkdir -p $out/lib && cp -r opt/figma-linux/* $_
72 mkdir -p $out/bin && ln -s $out/lib/figma-linux $_/figma-linux
76 wrapProgramShell $out/bin/figma-linux \
77 "''${gappsWrapperArgs[@]}" \
78 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime=true}}"
84 substituteInPlace $out/share/applications/figma-linux.desktop \
85 --replace "Exec=/opt/figma-linux/figma-linux" "Exec=$out/bin/${finalAttrs.pname}"
89 description = "Unofficial Electron-based Figma desktop app for Linux";
90 homepage = "https://github.com/Figma-Linux/figma-linux";
91 platforms = [ "x86_64-linux" ];
92 license = licenses.gpl2Plus;
93 maintainers = with maintainers; [
97 mainProgram = "figma-linux";