A Nix package for Cursor Agent CLI that works on NixOS.
This package is now officially packaged and maintained in nixpkgs. The official package provides the same functionality with regular updates and maintenance.
Cursor Agent ships with a pre-packaged Node.js binary that is dynamically linked
against FHS (Filesystem Hierarchy Standard) paths like /lib64/ld-linux-x86-64.so.2
and expects standard library locations. This doesn't work on NixOS, which uses the
Nix store for all dependencies.
This package uses buildFHSUserEnv to wrap the bundled Cursor Agent binaries in an
FHS-compatible environment. This allows the pre-packaged Node.js binary and native
modules to run without modification.
default.nix- The Cursor Agent package definitionshell.nix- A demo development environment that includes cursor-agent
# Build the package
nix-build default.nix
# Run cursor-agent
./result/bin/cursor-agent --version
./result/bin/cursor-agent --help# Enter the shell
nix-shell
# cursor-agent is now available
cursor-agent --versionOr run commands directly:
nix-shell --run "cursor-agent --help"To update to a newer version, change the version and sha256 in default.nix.