diff options
author | ercao <vip@ercao.cn> | 2022-11-06 14:59:10 +0800 |
---|---|---|
committer | ercao <vip@ercao.cn> | 2022-11-13 21:20:17 +0800 |
commit | a25c3c56e74ff7827c9326534368bac247106ea0 (patch) | |
tree | cf6b7221c55aa8a26aa2e4160bcc9598ced4c2b7 /pkgs/applications/graphics/figma-linux | |
parent | 90babdcf38cd283b116fed0d79bf815e270c4638 (diff) |
figma-linux: init at 0.10.1
Signed-off-by: ercao <vip@ercao.cn>
Diffstat (limited to 'pkgs/applications/graphics/figma-linux')
-rw-r--r-- | pkgs/applications/graphics/figma-linux/default.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/figma-linux/default.nix b/pkgs/applications/graphics/figma-linux/default.nix new file mode 100644 index 0000000000000..1afc65ea0fc10 --- /dev/null +++ b/pkgs/applications/graphics/figma-linux/default.nix @@ -0,0 +1,77 @@ +{ pkgs +, lib +, stdenv +, fetchurl +, autoPatchelfHook +, dpkg +, ... +}: +with lib; +stdenv.mkDerivation rec { + pname = "figma-linux"; + version = "0.10.0"; + + src = fetchurl { + url = "https://github.com/Figma-Linux/figma-linux/releases/download/v${version}/figma-linux_${version}_linux_amd64.deb"; + sha256 = "sha256-+xiXEwSSxpt1/Eu9g57/L+Il/Av+a/mgGBQl/4LKR74="; + }; + + nativeBuildInputs = [ autoPatchelfHook dpkg ]; + + buildInputs = with pkgs;[ + alsa-lib + at-spi2-atk + cairo + cups.lib + dbus.lib + expat + gdk-pixbuf + glib + gtk3 + libdrm + libxkbcommon + mesa + nspr + nss + pango + ] ++ (with pkgs.xorg; [ + libX11 + libXcomposite + libXdamage + libXext + libXfixes + libXrandr + libxcb + libxshmfence + ]); + + runtimeDependencies = with pkgs; [ eudev ]; + + unpackCmd = "dpkg -x $src ."; + + sourceRoot = "."; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib && cp -r opt/figma-linux/* $_ + mkdir -p $out/bin && ln -s $out/lib/figma-linux $_/figma-linux + + cp -r usr/* $out + + runHook postInstall + ''; + + postFixup = '' + substituteInPlace $out/share/applications/figma-linux.desktop \ + --replace "Exec=/opt/figma-linux/figma-linux" "Exec=$out/bin/${pname}" + ''; + + meta = { + description = "unofficial Electron-based Figma desktop app for Linux"; + homepage = "https://github.com/Figma-Linux/figma-linux"; + platforms = [ "x86_64-linux" ]; + license = licenses.gpl2; + maintainers = with maintainers; [ ercao ]; + }; +} |