Improve Cursor AppImage compatibility with enhanced library support and environment setup

This commit is contained in:
thinktankmachine
2025-08-06 15:28:39 +10:00
parent c11c0ced2e
commit 9d0bcd6aed
2 changed files with 41 additions and 1 deletions
+8
View File
@@ -36,5 +36,13 @@
];
};
};
# Expose the Cursor package directly
packages.x86_64-linux.cursor =
let
cursorConfig = self.nixosConfigurations.cursor-system.config.home-manager.users.liam.home.packages;
cursorPackage = builtins.elemAt cursorConfig 12; # Cursor is at index 12
in
cursorPackage;
};
}
+33 -1
View File
@@ -1,8 +1,40 @@
{ config, pkgs, lib, ... }:
let
# Cursor 1.3.9 AppImage wrapper
# Cursor 1.3.9 AppImage wrapper with enhanced compatibility
cursorAppImage = pkgs.writeShellScriptBin "cursor" ''
# Set up environment for better AppImage compatibility
export APPDIR=""
export ARGV0=""
export OWD=""
# Ensure proper library paths
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
pkgs.glib
pkgs.gtk3
pkgs.cairo
pkgs.pango
pkgs.atk
pkgs.gdk-pixbuf
pkgs.xorg.libX11
pkgs.xorg.libXcomposite
pkgs.xorg.libXcursor
pkgs.xorg.libXext
pkgs.xorg.libXfixes
pkgs.xorg.libXi
pkgs.xorg.libXrandr
pkgs.xorg.libXrender
pkgs.xorg.libXtst
pkgs.nss
pkgs.nspr
pkgs.dbus
pkgs.at-spi2-atk
pkgs.at-spi2-core
pkgs.mesa
pkgs.alsa-lib
]}:$LD_LIBRARY_PATH"
# Run the AppImage with appimage-run
exec ${pkgs.appimage-run}/bin/appimage-run ${pkgs.fetchurl {
url = "https://downloads.cursor.com/production/54c27320fab08c9f5dd5873f07fca101f7a3e076/linux/x64/Cursor-1.3.9-x86_64.AppImage";
sha256 = "076ijp033xjg09aqjhjm6sslvq0hsjga35840m3br722lqpi6jfj";