Updated README with CI workflow details and native aarch64 support; remove obsolete test-setup.sh script
Update Cursor Version / update-cursor (push) Successful in 20s

This commit is contained in:
2025-12-24 20:28:12 -04:00
parent b62d3e3480
commit 9e18ec27f9
2 changed files with 11 additions and 124 deletions
+11 -14
View File
@@ -1,6 +1,8 @@
# Self-Updating Cursor Flake
A Nix flake that provides the Cursor code editor with automatic daily updates via GitHub Actions.
A Nix flake that provides the Cursor code editor with automatic daily updates via CI (GitHub Actions-compatible workflows, e.g. GitHub Actions or Gitea Actions).
This fork includes **native `aarch64-linux` (linux-arm64) support** in addition to `x86_64-linux`.
## Features
@@ -15,7 +17,7 @@ A Nix flake that provides the Cursor code editor with automatic daily updates vi
### Method 1: Direct Installation
```bash
# Install Cursor directly
nix profile install github:your-username/cursor-nixos-flake
nix profile install git+https://git.chiasson.cloud/Olivier/cursor-nixos-flake
# Run Cursor
cursor --version
@@ -24,7 +26,7 @@ cursor --version
### Method 2: Add to Your Flake
Add to your `flake.nix` inputs:
```nix
inputs.cursor.url = "github:your-username/cursor-nixos-flake";
inputs.cursor.url = "git+https://git.chiasson.cloud/Olivier/cursor-nixos-flake";
```
Then use in your configuration:
@@ -50,10 +52,10 @@ devShells.default = pkgs.mkShell {
### Method 3: Temporary Run
```bash
# Run without installing
nix run github:your-username/cursor-nixos-flake
nix run git+https://git.chiasson.cloud/Olivier/cursor-nixos-flake
# Build and run
nix build github:your-username/cursor-nixos-flake
nix build git+https://git.chiasson.cloud/Olivier/cursor-nixos-flake
./result/bin/cursor
```
@@ -64,9 +66,6 @@ To manually update Cursor to the latest version:
```bash
./update-cursor.sh
```
Note: on a fresh fork, `cursor-release.nix` may contain a placeholder aarch64 hash until you run the updater once (or trigger the GitHub Action via `workflow_dispatch`).
To update to a specific version:
```bash
@@ -76,11 +75,11 @@ To update to a specific version:
## How It Works
### Automatic Updates
The GitHub Actions workflow runs daily and:
The CI workflow in `.github/workflows/update-cursor.yml` runs daily and:
1. Checks Cursor's API for the latest version
2. Only updates if a new version is available
3. Downloads the AppImage and calculates SHA256 hash
4. Updates `cursor-release.nix` with the new version and per-architecture hashes
4. Updates `cursor-release.nix` with the new version and **per-architecture hashes** (`x86_64-linux` + `aarch64-linux`)
5. Tests the build and commits changes
6. Pushes the update back to the repository
@@ -93,14 +92,12 @@ The `update-cursor.sh` script provides:
## API Endpoints
- **AppImage Download**: `https://api2.cursor.sh/updates/download/golden/linux-x64/cursor/{version}`
- **x86_64 AppImage Download**: `https://api2.cursor.sh/updates/download/golden/linux-x64/cursor/{version}`
- **aarch64 AppImage Download**: `https://api2.cursor.sh/updates/download/golden/linux-arm64/cursor/{version}`
## Testing
```bash
# Test the complete setup
./test-setup.sh
# Test flake syntax
nix flake check