11 stdenv.mkDerivation (finalAttrs: {
12 pname = "figma-linux";
16 url = "https://github.com/Figma-Linux/figma-linux/releases/download/v${finalAttrs.version}/figma-linux_${finalAttrs.version}_linux_amd64.deb";
17 hash = "sha256-6lFeiecliyuTdnUCCbLpoQWiu5k3OPHxb+VF17GtERo=";
27 buildInputs = with pkgs;[
43 ] ++ (with pkgs.xorg; [
54 runtimeDependencies = with pkgs; [ eudev ];
56 unpackCmd = "dpkg -x $src .";
60 # Instead of double wrapping the binary, simply pass the `gappsWrapperArgs`
61 # to `makeWrapper` directly
67 mkdir -p $out/lib && cp -r opt/figma-linux/* $_
68 mkdir -p $out/bin && ln -s $out/lib/figma-linux $_/figma-linux
72 wrapProgramShell $out/bin/figma-linux \
73 "''${gappsWrapperArgs[@]}" \
74 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
80 substituteInPlace $out/share/applications/figma-linux.desktop \
81 --replace "Exec=/opt/figma-linux/figma-linux" "Exec=$out/bin/${finalAttrs.pname}"
85 description = "Unofficial Electron-based Figma desktop app for Linux";
86 homepage = "https://github.com/Figma-Linux/figma-linux";
87 platforms = [ "x86_64-linux" ];
88 license = licenses.gpl2Plus;
89 maintainers = with maintainers; [ ercao kashw2 ];
90 mainProgram = "figma-linux";