Cursor is now available on nixos

I’ve added cursor to nixpkgs-unstable as code-cursor. You can find it in the nixpkgs search.

Caveats:

  • Linux-only. Cursor is packaged as an AppImage and requires a FHS environment which won’t work on Darwin. (You’re better off with the official release binaries from here on Darwin and Windows).
  • Updates will lag the official cursor releases. There’s an update bot (or someone can update manually), plus time for approval, merging, and going through Hydra.
  • Bugs in the app? Please report them here.
  • Need an update? Open a packaging request or submit a PR to update. We won’t bite, promise.
6 Likes

I’m not sure how to provide better reporting but would be happy to if I can find out how but the window opens and then nothing happens.

[lazylambda@nixos:~]$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-24.05
environment.systemPackages = (

  let unstable = import (pkgs.fetchFromGitHub {
        owner="NixOS";
		    repo="nixpkgs";
        rev="1bbe1fee60c10d628efbc639783197d1020c5463";# "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24bs";
       	sha256= "sha256-igwdKMfWCo6pKMldoSKhTsx5QKSM7JXjbK6tCllSzlU=";
	    }) { config = {
             allowUnfree = true;
             overlays = [
               (import (builtins.fetchTarball {
                 url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
               }))
             ];
           };
         };
in
    with pkgs [ <omitted > ] ++
    [ <omitted>
    unstable.code-cursor
    ]
)

This is awesome.

Does anyone know how to use Cursor with a flake dev environment? I expect to be able to do
nix develop
cursor .

This works with VS Code but not Cursor. Right now I can’t use Cursor for development unless I install everything globally which is really annoying. There might be a simple fix for this but I’m a Nix novice and haven’t been able to figure one out.

1 Like

I’m testing this out right now.

If you could do me a favor, please run nix flake check flake.nix --impure and let me know if you see any errors such as " error: attribute ‘code-cursor’ missing".

No errors, just an empty output.

I need additional maintainers on the package. Until then, expect minimal support and updates.

Extra maintainers would also expedite getting new releases sooner, keeping it backported, etc. I get pushback from reviewers over it being an unfree package and that delays new commits.

P.S. In an ideal world, the cursor people would maintain the derivation. I’m happy to walk them through getting started.

I got it working. I needed to move everything into buildInputs instead of having some things in nativeBuildInputs. I’m still not sure why VS Code worked without this change though.

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  };
  outputs =
    {
      self,
      nixpkgs,
    }:

    let
      pkgs = import nixpkgs {
        system = "x86_64-linux";
        config = {
          allowUnfree = true;
        };
      };
    in
    with pkgs;
    {
      devShells.x86_64-linux.default = mkShell {
        buildInputs = [
          cargo
          rustc
          SDL2
          alsa-lib.dev
          code-cursor
          pkg-config
        ];

        shellHook = ''
          export PKG_CONFIG_PATH=${pkgs.alsa-lib.dev}/lib/pkgconfig:$PKG_CONFIG_PATH
        '';
      };
    };
}

  1. You’re a rock star.
  2. nativeBuildInputs is for the build system itself. buildInputs are the things to be built.
  3. vscode has a bunch of extra work to make it operate in cases like this. Unfortunately, I don’t have that much time to productionize this package.
  4. Want to be one of the maintainers?
1 Like

FYI, I deleted the backport request. I’m already getting more support requests than I have time for (I’m just a volunteer nixpkgs maintainer).

This can go into the stable channel after we have enough maintainers to field issues.

Having run into a similar issue with logseq recently (also packaged as an AppImage), I suspect the problem is a mismatch between the packages available in 24.05 and the ones needed by cursor.

Hi! I’m an amateur Nix/NixOS user and interested potential Cursor user. I currently use VSCodium, and within that package I have the ability to declaratively specify which extensions to install. Cursor has an auto-import-from-VSCode feature, but - as I expected - that doesn’t work for VSCode installed under Nix.

I’m not expert enough to know for sure, but it seems like declarative configuration of extensions is not currently possible with Cursor. Is that a correct understanding?

I would be interested to explore contributing a fix for this if there is a viable strategy for appimages within Nix, I just don’t know how to go about it yet.

Yes, you’re correct. Extensions live in this weird liminal space where they can be downloaded, automatically patched, and executed; they still work on Cursor they way they would on a generic Linux.

Making declarative configuration work could be tricky. For vscode, python, etc. extensions/packages are compiled against their base package and it generates a new binary.

Could that be done with an AppImage? Possibly. An AppImage contains a binary executable and a read-only filesystem via squishfs. The usual nixos build unpacks the app image, mounts the r/o filesystem, copies some files into $out to match desktop expectations, patches the executable, then packs it all up again. (Note: This only applies to Linux. Cursor ships disk image files for Darwin and I haven’t looked at that repackaging process yet.)

The big question is: where do the extensions live? If they live in the filesystem portion (likely), we’d have to unpack, modify, and repack the filesystem part. We have someone exploring that idea to patch a long-standing display error on gtk-based desktops.

I’m sorry there’s no easy answer. If you choose to try it, make sure you have an account on the Discord as well as on Matrix (chat). If you file a PR, I’m the maintainer for code-cursor and I’m happy to help you through the process.

P.S. If you decide to try this, create a new derivation such as code-cursor-with-extensions and inherit the desired sources from code-cursor.

I’m trying to use cursor in a nix development environment.

I copied from @Asraelite’s instructions into my flake.nix.

I had a massive pile of errors. I made a lot of them go away by using nixGL:

nix run --impure github:nix-community/nixGL -- cursor .

But I still get a few errors and a corrupted window:

todesktop/runtime: skipping autoUpdater initialization because application is not in AppImage.
Gtk-Message: 01:11:11.132: Failed to load module "colorreload-gtk-module"
Gtk-Message: 01:11:11.132: Failed to load module "window-decorations-gtk-module"
Warning: 'update' is not in the list of known options, but still passed to Electron/Chromium.
ac: Unknown GPU, using 0 for raster_config
[main 2025-03-24T01:11:11.269Z] update#setState disabled
[main 2025-03-24T01:11:11.269Z] update#ctor - updates are disabled as there is no update URL
Error: Cannot find module './build/Debug/keymapping'
Require stack:
- /nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js
- /nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js
- 
    at Module._resolveFilename (node:internal/modules/cjs/loader:1152:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:120381)
    at Module._load (node:internal/modules/cjs/loader:993:27)
    at c._load (node:electron/js2c/node_init:2:13801)
    at Module.require (node:internal/modules/cjs/loader:1240:19)
    at N (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js:2:647)
    at NativeBinding._init (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:19:24)
    at NativeBinding.getKeyMap (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:24:10)
    at exports.getKeyMap (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:63:18)
    at S (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27302)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27100) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js',
    '/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js',
    undefined
  ]
}
TypeError: Cannot read properties of null (reading 'getCurrentKeyboardLayout')
    at NativeBinding.getCurrentKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:34:29)
    at exports.getCurrentKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:60:18)
    at S (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27318)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27100)
TypeError: Cannot read properties of null (reading 'onDidChangeKeyboardLayout')
    at NativeBinding.onDidChangeKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:43:22)
    at exports.onDidChangeKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:66:18)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27113)
[684837:0324/011111.411309:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
ac: Unknown GPU, using 0 for raster_config
[684837:0324/011111.678771:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
ac: Unknown GPU, using 0 for raster_config
[684837:0324/011111.935130:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[684900:0324/011112.003794:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[main 2025-03-24T01:11:12.304Z] vscode-file: Refused to load resource /tmp/nix-shell.fmGqVG/.mount_CursorHAmpOo/usr/share/cursor/resources/app/extensions/theme-seti/icons/seti.woff from vscode-file: protocol (original URL: vscode-file://vscode-app/tmp/nix-shell.fmGqVG/.mount_CursorHAmpOo/usr/share/cursor/resources/app/extensions/theme-seti/icons/seti.woff)
[684900:0324/011112.311318:ERROR:remote_font_face_source.cc(392)] NOTREACHED hit. 
[684900:0324/011112.378115:ERROR:remote_font_face_source.cc(392)] NOTREACHED hit. 
[main 2025-03-24T01:11:13.087Z] CodeWindow: renderer process gone (reason: crashed, code: 132)
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:88976)
    at _.send (node:electron/js2c/browser_init:2:73588)
    at i.send (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:45:70526)
    at $.p (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:51:4711)
    at $.o (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:51:4676)
    at $.m (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:51:4532)
    at b.value (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:52:302)
    at t.B (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:750)
    at t.fire (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:973)
    at /nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:39:31064
    at b.value (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:39:29769)
    at t.B (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:750)
    at t.C (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:825)
    at t.fire (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:1044)
    at b.value (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:39:29614)
    at t.B (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:750)
    at t.fire (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:44:973)
    at App.ue (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:39:32026)
    at App.emit (node:events:531:35)
    at BrowserWindow.<anonymous> (node:electron/js2c/browser_init:2:11803)
    at BrowserWindow.emit (node:events:519:28)

(cursor:684837): Gdk-WARNING **: 01:11:15.162: Native Windows wider or taller than 32767 pixels are not supported

I would advise to install some kind of appimagelauncher and install official cursor builds\

appimage-run gives me similar issues.

[devshell]$ nix run --impure github:nix-community/nixGL -- appimage-run ~/Downloads/Cursor-0.47.9-x86_64.AppImage 
Cursor-0.47.9-x86_64.AppImage installed in /home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7
Gtk-Message: 01:47:58.208: Failed to load module "colorreload-gtk-module"
Gtk-Message: 01:47:58.208: Failed to load module "window-decorations-gtk-module"
ac: Unknown GPU, using 0 for raster_config
[main 2025-03-24T01:47:58.325Z] updateURL https://api2.cursor.sh/updates/api/update/linux-x64/cursor/0.47.9/99c9c6fdfa0e3977de293ec8927ea469f3d8be1f1de321af2d1898b5baecbeda/stable
[main 2025-03-24T01:47:58.325Z] update#setState idle
Error: Cannot find module './build/Debug/keymapping'
Require stack:
- /home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:124485)
    at Module._load (node:internal/modules/cjs/loader:1058:27)
    at c._load (node:electron/js2c/node_init:2:16955)
    at Module.require (node:internal/modules/cjs/loader:1318:19)
    at require (node:internal/modules/helpers:179:18)
    at NativeBinding._init (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:19:24)
    at NativeBinding.getKeyMap (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:24:10)
    at exports.getKeyMap (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:63:18)
    at _5 (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:56:27042)
    at Rh.g (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:56:27559) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js'
  ]
}
TypeError: Cannot read properties of null (reading 'getCurrentKeyboardLayout')
    at NativeBinding.getCurrentKeyboardLayout (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:34:29)
    at exports.getCurrentKeyboardLayout (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:60:18)
    at _5 (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:56:27058)
    at Rh.g (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:56:27559)
TypeError: Cannot read properties of null (reading 'onDidChangeKeyboardLayout')
    at NativeBinding.onDidChangeKeyboardLayout (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:43:22)
    at exports.onDidChangeKeyboardLayout (/home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/node_modules/native-keymap/index.js:66:18)
    at Rh.g (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:56:27571)
[696558:0324/014758.486335:ERROR:gpu_process_host.cc(981)] GPU process exited unexpectedly: exit_code=139
ac: Unknown GPU, using 0 for raster_config
[696558:0324/014758.718172:ERROR:gpu_process_host.cc(981)] GPU process exited unexpectedly: exit_code=139
ac: Unknown GPU, using 0 for raster_config
[696558:0324/014758.978478:ERROR:gpu_process_host.cc(981)] GPU process exited unexpectedly: exit_code=139
[main 2025-03-24T01:47:59.380Z] vscode-file: Refused to load resource /tmp/nix-shell.fmGqVG/.mount_CursorHAmpOo/usr/share/cursor/resources/app/extensions/theme-seti/icons/seti.woff from vscode-file: protocol (original URL: vscode-file://vscode-app/tmp/nix-shell.fmGqVG/.mount_CursorHAmpOo/usr/share/cursor/resources/app/extensions/theme-seti/icons/seti.woff)
[696649:0324/014759.387227:ERROR:remote_font_face_source.cc(357)] NOTREACHED hit. 
[696649:0324/014759.450965:ERROR:remote_font_face_source.cc(357)] NOTREACHED hit. 
[main 2025-03-24T01:48:00.776Z] Extension host with pid 696766 exited with code: 0, signal: unknown.
[main 2025-03-24T01:48:00.777Z] CodeWindow: renderer process gone (reason: crashed, code: 132)

(cursor:696558): Gdk-WARNING **: 01:48:00.780: Native Windows wider or taller than 32767 pixels are not supported

(cursor:696558): Gdk-WARNING **: 01:48:00.781: Native Windows wider or taller than 32767 pixels are not supported
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:93065)
    at _.send (node:electron/js2c/browser_init:2:76113)
    at Cy.send (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:38:23295)
    at Rp.p (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19056)
    at Rp.o (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19021)
    at Rp.m (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:18883)
    at $a.value (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:37:265)
    at $.B (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:746)
    at $.fire (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:964)
    at file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:30:6515
    at $a.value (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:30:5288)
    at $.B (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:746)
    at $.C (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:816)
    at $.fire (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:1033)
    at $a.value (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:30:5147)
    at $.B (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:746)
    at $.fire (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:964)
    at App.U (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:30:7434)
    at App.emit (node:events:530:35)
    at BrowserWindow.<anonymous> (node:electron/js2c/browser_init:2:12666)
    at BrowserWindow.emit (node:events:518:28)
    at BrowserWindow.callbackTrampoline (node:internal/async_hooks:130:17)

(cursor:696558): Gdk-WARNING **: 01:48:00.805: Native Windows wider or taller than 32767 pixels are not supported
[main 2025-03-24T01:48:28.325Z] update#setState checking for updates
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:93065)
    at _.send (node:electron/js2c/browser_init:2:76113)
    at Cy.send (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:38:23295)
    at Rp.p (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19056)
    at Rp.o (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19021)
    at Rp.m (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:18883)
    at $a.value (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:37:265)
    at $.B (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:746)
    at $.fire (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:964)
    at Bh.f (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:3256)
    at Bh.A (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:10953)
    at Bh.checkForUpdates (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:5315)
    at file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:4928
[main 2025-03-24T01:48:28.406Z] update#setState idle
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:93065)
    at _.send (node:electron/js2c/browser_init:2:76113)
    at Cy.send (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:38:23295)
    at Rp.p (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19056)
    at Rp.o (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:19021)
    at Rp.m (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:36:18883)
    at $a.value (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:37:265)
    at $.B (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:746)
    at $.fire (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:35:964)
    at Bh.f (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:3256)
    at Bh.G (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:10694)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Bh.A (file:///home/blarsen/.cache/appimage-run/2f464e0c61e63bc48386aae792aee3c22df473a97efc44a3f855c754a821b1f7/usr/share/cursor/resources/app/out/main.js:58:11016)

(cursor:696558): Gdk-WARNING **: 01:48:44.774: Native Windows wider or taller than 32767 pixels are not supported

For the first error, while ./build/Debug/keymapping.node does not exist, ./build/Release/keymapping.node does. I hacked into my nix store, unpacked node_modules.asar, copied Release/keymappnig.node to Debug/keymapping.node, and repacked the asar. This got me past the first error, but then I got an error loading libxkbfile.so

Thanks for the note @bryanlarsen

Cursor changed their AppImage layout recently and I’ll be updating the nixpkgs derivation this week to match. Some of the changes should reduce the number of spurious warnings and errors.

You can follow the progress at Tracking bug for code-cursor 0.45.14 -> current · Issue #392555 · NixOS/nixpkgs · GitHub

Thank for taking the time to put this up.

I am struggling with keybindings in Cursor unfortunately. I am using a pure Wayland setup with Sway and a Swedish keyboard.

When I start cursor and try to do something like toggling the terminal which uses ctrl+```, it instead does ctrl+=` (checked through the troubleshooting function). I couldn’t even get the quote in a text editor.

I suspect this has to do with the fact that Electron wasn’t properly handling the wayland layer so I started cursor using this following

ELECTRON_OZONE_PLATFORM_HINT=auto cursor

And sure enough, I now am able to type ctrl+``` in the editor and get proper characters but it still doesn't work to do the mapping. Trying to setup the mapping now gives me ctrl+keyincomposition` and I get the following errors on the terminal I started cursor with

Error: Cannot find module './build/Debug/keymapping'
Require stack:
- /nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js
- /nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js
-
    at Module._resolveFilename (node:internal/modules/cjs/loader:1152:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:120381)
    at Module._load (node:internal/modules/cjs/loader:993:27)
    at c._load (node:electron/js2c/node_init:2:13801)
    at Module.require (node:internal/modules/cjs/loader:1240:19)
    at N (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js:2:647)
    at NativeBinding._init (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:19:24)
    at NativeBinding.getKeyMap (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:24:10)
    at exports.getKeyMap (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:63:18)
    at S (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27302)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27100) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js',
    '/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/main.js',
    undefined
  ]
}
TypeError: Cannot read properties of null (reading 'getCurrentKeyboardLayout')
    at NativeBinding.getCurrentKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:34:29)
    at exports.getCurrentKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:60:18)
    at S (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27318)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27100)
TypeError: Cannot read properties of null (reading 'onDidChangeKeyboardLayout')
    at NativeBinding.onDidChangeKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:43:22)
    at exports.onDidChangeKeyboardLayout (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/node_modules.asar/native-keymap/index.js:66:18)
    at I.g (/nix/store/k4sg2ai151snb8h1bpyhslwx13xnbgr1-cursor-0.42.4-extracted/resources/app/out/vs/code/electron-main/main.js:120:27113)
[main 2025-03-25T10:39:17.284Z] Extension host with pid 559718 exited with code: 0, signal: unknown.

I am not expert here but could it be that we are missing some dependencies when cursor is installed? Not sure it helps but it does work as I would expect in VS Code.

Thank you – I appreciate the bug report.

I can apply this change with the next release. (As soon as Cursor updates the MacOS builds to match the Linux ones).

You can check on the status of that update at Tracking bug for code-cursor 0.45.14 -> current · Issue #392555 · NixOS/nixpkgs · GitHub

1 Like

I fixed the X11 and Wayland window support in this latest update: Nixpkgs PR #393609 ("code-cursor: 0.45.14 -> 0.47.8") progress

It’s 0.47.8 (and no linux-arm64) as we have to release the same version across platforms.

This release restores the automatic updater where when we see a new stable release it can get approved and distributed quickly. (As long as darwin and linux are at the same version.)

ifnk in :globe_with_meridians: ifnk-pc in nixos-config on  master took 20s ❯ sudo nixos-rebuild switch --flake .#ifnk-pc -vv --show-trace --option substituters “https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store
$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.DMIbtN/nixos-rebuild .#nixosConfigurations.“ifnk-pc”.config.system.build.nixos-rebuild -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store
evaluating file ‘<nix/derivation-internal.nix>’
evaluating derivation ‘git+file:///home/ifnk/nixos-config#nixosConfigurations.“ifnk-pc”.config.system.build.nixos-rebuild’…
evaluating file ‘/nix/store/ad689rd7j0prpyj483hfhsdmhgsb0bd1-source/flake.nix’
$ exec /nix/store/rdpwz6cq2d2blj3naqgh8pyn9l770zj7-nixos-rebuild/bin/nixos-rebuild switch --flake .#ifnk-pc -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store
building the system configuration…
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations.“ifnk-pc”.config.system.build.toplevel -vv --show-trace --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store --out-link /tmp/nixos-rebuild.m4iary/result
evaluating file ‘<nix/derivation-internal.nix>’
evaluating derivation ‘git+file:///home/ifnk/nixos-config#nixosConfigurations.“ifnk-pc”.config.system.build.toplevel’…
evaluating file ‘/nix/store/ad689rd7j0prpyj483hfhsdmhgsb0bd1-source/flake.nix’
these 20 derivations will be built:
/nix/store/a2xjqwjfmj47366ll884c54786xcjmv6-Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage.drv
/nix/store/q2c370akz10mljiwjrw0riqbmz63cbgv-cursor-0.47.8-extracted.drv
/nix/store/m9qsrd7rdfkazxb2wki1yprnmvlndp5c-cursor-0.47.8-init.drv
/nix/store/0b52lhak4v7b4dl0fxrkpzssi2n3g9ws-cursor-0.47.8-bwrap.drv
/nix/store/qs6dh2gvlj4br4zf5q861q7v8v7jxg0n-cursor-0.47.8.drv
/nix/store/x72f97i3f8lnlajc3dqlb87dll69z5cf-cursor-0.47.8.drv
/nix/store/2xwirny80dlli3d7x4hhzl1algi8nn2j-home-manager-path.drv
/nix/store/mfmswhmy6q5xvnvkmrr9hyjg8rya8afg-user-environment.drv
/nix/store/qpw8wvq0fgb2xj24b32jk0djkiqh3i9l-hm_fontconfigconf.d10hmfonts.conf.drv
/nix/store/byxcwlycrhlmpi7dbyslqy5j2pjmijvq-cursor-0.47.8-fish-completions.drv
/nix/store/whz3589hijgh4kf26xa85nxxvrsciib9-ifnk-fish-completions.drv
/nix/store/7bldwmsp786yxsc4q850pxb7v5l9g4ln-man-paths.drv
/nix/store/6lpmhhnv2hl5blfj4mljxbz4650yqw3p-man-cache.drv
/nix/store/z1p87cx719b9940ik4wki4xzvv57d4k3-hm_.manpath.drv
/nix/store/akary6bd6b7xb6261v9a2bksc3b5wl5m-home-manager-files.drv
/nix/store/33g9rlfkd4hvnqlwkh1pvq9bbj9j4ncd-home-manager-generation.drv
/nix/store/nj98lw9cnww14b75kvwgaalqw1nqmikb-unit-home-manager-ifnk.service.drv
/nix/store/r7m2sfxw2fp8klskaqi68qavwqrg6x5j-system-units.drv
/nix/store/b8kg0c0ml4l1ih838q0183wqkv4w7k8x-etc.drv
/nix/store/2cypa772wgrsqsdm7kkhyapvmccr79dq-nixos-system-ifnk-pc-25.05.20250331.77b584d.drv
building ‘/nix/store/a2xjqwjfmj47366ll884c54786xcjmv6-Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage.drv’…
[1/0/20 built] building Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage: Dload Upload Total Spent Left Speed
[1/0/20 built] building Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage: Dload Upload Total Spent Left Speed
[1/0/20 built] building Cursor-0.47.8-82ef0f61c01d079d1b7e5ab04d88499d5af500e3.deb.glibc2.25-x86_64.AppImage: Dload Upload Total Spent Left Speed

I’ve been stuck here for a long time. Why is this happening