Hiya fellow NixOS users, hope this post finds you well
I’m reaching out for some help with setting up the Cursor IDE to use rust-analyzer, and I’d love your insights if anyone has encountered similar issues.
System Details:
NixOS Version: 24.11
Configuration Method: Using flakes, combining stable and unstable packages.
Installation Attempts: Tried both nixpkgs and home-manager.
The Problem I’m Facing:
Whenever I try to install Cursor with the rust-analyzer extension using the vscode-with-extensions package, I run into errors that prevent Cursor from building. Here are the error messages:
error: attribute ‘executableName’ missing
error: attribute ‘cursor’ missing
These issues appear no matter which configuration method I try—either via nixpkgs or home-manager.
My Goal vs. Reality:
I’m hoping to integrate Cursor in place of VSCode with the rust-analyzer extension. Unfortunately, I can’t even get Cursor to build due to these errors.
Any advice or suggestions would be incredibly appreciated!
I’ve never heard of cursor nor am I very familiar with vscode-with-extensions. Is it possible to just install the rust-analyzer extension another way? e.g. I use an abstraction to write out to ~/.vscode-oss/extensions for vscodium, I assume cursor has an equivalent?
Cursor is a fork of VSCodium but with a lot of AI features, perhaps not something popular within the NixOS community, but for me, a tool is a tool.
I didn’t consider patching Cursor’s extensions that way, but that’d be a huge saver for anything that isn’t directly compatible with Cursor!
If you have the time and desire, would you be willing to illustrate how I would go about doing this? I’ve never patched the directory contents of a derivation within my configuration, so this is a new experience for me.
Thank you again for the speedy reply and most importantly the brilliant idea, I’ll try to hack something together until I learn what the proper way would be
code-cursor maintainer here. code-cursor doesn’t work with vscode-with-extensions since it doesn’t use the base vscode build from nixpkgs. (This is because the cursor folks make changes to vscode itself so I can’t layer cursor over standard vscode.)
oh nice! I didn’t realize cursor worked on nixos. Thanks @sarahec !!
I might give cursor a try
[das@t:~/Downloads/]$ export NIXPKGS_ALLOW_UNFREE=1
[das@t:~/Downloads/]$ nix-shell -p code-cursor
these 9 derivations will be built:
...
[nix-shell:~/Downloads/]$ cursor
@todesktop/runtime: skipping autoUpdater initialization because application is not in AppImage.
Warning: 'ozone-platform-hint' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'update' is not in the list of known options, but still passed to Electron/Chromium.
Note that we’re at 0.45.14 (latest is 0.46.8) as they changed their build platform and broke our downloading. I have a fix for that, but they also changed their packaging so I need to fix that too.
Have you ever tried reaching out to the Cursor team about supporting Nix? In theory, with the initial implementation at least, you’d think Cursor could auto-AI-magically keep it up to date
Funny you should ask, I’m working with one of their people now to get this up and auto-updating on the current stable release. Once that’s done, nixpkgs’ auto-update should be able to handle it.