Remove cursor-release.nix and integrate its content into flake.nix for better management of version and architecture-specific sources.
Update Cursor Version / update-cursor (push) Failing after 3m22s

This commit is contained in:
2026-01-11 21:34:04 -04:00
parent 2cc7bde1e1
commit 839fdd2048
4 changed files with 81 additions and 60 deletions
+19 -16
View File
@@ -9,18 +9,30 @@
let
lib = nixpkgs.lib;
systems = [ "x86_64-linux" "aarch64-linux" ];
cursorRelease = import ./cursor-release.nix;
channelForSystem = {
x86_64-linux = "linux-x64";
aarch64-linux = "linux-arm64";
# BEGIN managed by ./update-cursor.sh
version = "2.3.34";
sources = {
x86_64-linux = {
url = "https://downloads.cursor.com/production/643ba67cd252e2888e296dd0cf34a0c5d7625b96/linux/x64/Cursor-2.3.34-x86_64.AppImage";
sha256 = "1sn3fzby9nn388azyp73fqsmnq51n9z42q208prn3l2zw44brjv6";
};
aarch64-linux = {
url = "https://downloads.cursor.com/production/643ba67cd252e2888e296dd0cf34a0c5d7625b96/linux/arm64/Cursor-2.3.34-aarch64.AppImage";
sha256 = "1msdsv0h53slmlnsckrl32g9pnqxx44039yky59h78pgfwy5kjgg";
};
};
# END managed by ./update-cursor.sh
pkgsFor = system: import nixpkgs { inherit system; };
buildCursor = pkgs: { version, url, sha256 }:
buildCursor = { pkgs, system }:
let
src = pkgs.fetchurl { inherit url sha256; };
source = sources.${system} or (throw "Unsupported system: ${system}");
src = pkgs.fetchurl {
url = source.url;
sha256 = source.sha256;
};
# Extract the AppImage to get access to the icon and desktop file
appimageContents = pkgs.appimageTools.extract {
@@ -114,19 +126,10 @@
packages = lib.genAttrs systems (system:
let
pkgs = pkgsFor system;
version = cursorRelease.version;
channel = channelForSystem.${system} or (throw "Unsupported system: ${system}");
# Prefer the stable resolved downloads.cursor.com URL stored by ./update-cursor.sh.
# Fallback to the API URL for older cursor-release.nix files.
url =
if cursorRelease ? url && cursorRelease.url ? ${system}
then cursorRelease.url.${system}
else "https://api2.cursor.sh/updates/download/golden/${channel}/cursor/${version}";
sha256 = cursorRelease.sha256.${system} or "0000000000000000000000000000000000000000000000000000";
in
{
default = self.packages.${system}.cursor;
cursor = buildCursor pkgs { inherit version url sha256; };
cursor = buildCursor { inherit pkgs system; };
});
# Overlay for easy integration into other flakes