windsurf: init at 1.2.6

+188 -1
+2 -1
pkgs/applications/editors/vscode/generic.nix
··· 33 34 # Attributes inherit from specific versions 35 version, 36 src, 37 meta, 38 sourceRoot, ··· 303 let 304 vscodeRipgrep = 305 if stdenv.hostPlatform.isDarwin then 306 - if lib.versionAtLeast version "1.94.0" then 307 "Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg" 308 else 309 "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
··· 33 34 # Attributes inherit from specific versions 35 version, 36 + vscodeVersion ? version, 37 src, 38 meta, 39 sourceRoot, ··· 304 let 305 vscodeRipgrep = 306 if stdenv.hostPlatform.isDarwin then 307 + if lib.versionAtLeast vscodeVersion "1.94.0" then 308 "Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg" 309 else 310 "Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
+20
pkgs/by-name/wi/windsurf/info.json
···
··· 1 + { 2 + "aarch64-darwin": { 3 + "version": "1.2.6", 4 + "vscodeVersion": "1.94.0", 5 + "url": "https://windsurf-stable.codeiumdata.com/darwin-arm64/stable/d08b8ea13d580d24be204c76e5dd1651d7234cd2/Windsurf-darwin-arm64-1.2.6.zip", 6 + "sha256": "b9a63785454003f7ccb3b6adebe232e24618247244b556ef61e9e974a4b77f65" 7 + }, 8 + "x86_64-darwin": { 9 + "version": "1.2.6", 10 + "vscodeVersion": "1.94.0", 11 + "url": "https://windsurf-stable.codeiumdata.com/darwin-x64/stable/d08b8ea13d580d24be204c76e5dd1651d7234cd2/Windsurf-darwin-x64-1.2.6.zip", 12 + "sha256": "4a4beae35117162b484521a64fc67cac044ced17a971553ab75ba8823b3cbb75" 13 + }, 14 + "x86_64-linux": { 15 + "version": "1.2.6", 16 + "vscodeVersion": "1.94.0", 17 + "url": "https://windsurf-stable.codeiumdata.com/linux-x64/stable/d08b8ea13d580d24be204c76e5dd1651d7234cd2/Windsurf-linux-x64-1.2.6.tar.gz", 18 + "sha256": "ad71eb02b9302d4cf1413c0a83763f45fe455e5be74ee9e1477bea2e85a02caa" 19 + } 20 + }
+57
pkgs/by-name/wi/windsurf/package.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + callPackage, 5 + vscode-generic, 6 + fetchurl, 7 + nixosTests, 8 + commandLineArgs ? "", 9 + useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin, 10 + }: 11 + let 12 + info = 13 + (lib.importJSON ./info.json)."${stdenv.hostPlatform.system}" 14 + or (throw "windsurf: unsupported system ${stdenv.hostPlatform.system}"); 15 + in 16 + callPackage vscode-generic rec { 17 + inherit commandLineArgs useVSCodeRipgrep; 18 + 19 + inherit (info) version vscodeVersion; 20 + pname = "windsurf"; 21 + 22 + executableName = "windsurf"; 23 + longName = "Windsurf"; 24 + shortName = "windsurf"; 25 + 26 + sourceRoot = if stdenv.hostPlatform.isDarwin then "Windsurf.app" else "Windsurf"; 27 + 28 + src = fetchurl { inherit (info) url sha256; }; 29 + 30 + tests = nixosTests.vscodium; 31 + 32 + updateScript = ./update/update.mts; 33 + 34 + # Editing the `codium` binary (and shell scripts) within the app bundle causes the bundle's signature 35 + # to be invalidated, which prevents launching starting with macOS Ventura, because VSCodium is notarized. 36 + # See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information. 37 + dontFixup = stdenv.hostPlatform.isDarwin; 38 + 39 + meta = { 40 + description = "Agentic IDE powered by AI Flow paradigm"; 41 + longDescription = '' 42 + The first agentic IDE, and then some. 43 + The Windsurf Editor is where the work of developers and AI truly flow together, allowing for a coding experience that feels like literal magic. 44 + ''; 45 + homepage = "https://codeium.com/windsurf"; 46 + license = lib.licenses.unfree; 47 + maintainers = with lib.maintainers; [ 48 + xiaoxiangmoe 49 + ]; 50 + platforms = [ 51 + "aarch64-darwin" 52 + "x86_64-darwin" 53 + "x86_64-linux" 54 + ]; 55 + sourceProvenance = [ lib.sourceTypes.binaryBytecode ]; 56 + }; 57 + }
+2
pkgs/by-name/wi/windsurf/update/.gitignore
···
··· 1 + node_modules 2 + package-lock.json
+12
pkgs/by-name/wi/windsurf/update/package.json
···
··· 1 + { 2 + "name": "windsurf-scripts", 3 + "version": "1.0.0", 4 + "scripts": { 5 + "update": "node update.mts" 6 + }, 7 + "dependencies": { 8 + "@types/node": "^22.13.1", 9 + "prettier": "^3.4.2", 10 + "typescript": "^5.7.3" 11 + } 12 + }
+9
pkgs/by-name/wi/windsurf/update/tsconfig.json
···
··· 1 + { 2 + "compilerOptions": { 3 + "allowJs": true, 4 + "checkJs": true, 5 + "module": "NodeNext", 6 + "noEmit": true, 7 + "strict": true 8 + } 9 + }
+82
pkgs/by-name/wi/windsurf/update/update.mts
···
··· 1 + #!/usr/bin/env nix-shell 2 + /* 3 + #!nix-shell -i node --pure --packages cacert nodejs_23 4 + */ 5 + import * as assert from "node:assert/strict"; 6 + import * as fsPromises from "node:fs/promises"; 7 + import * as path from "node:path"; 8 + import * as process from "node:process"; 9 + 10 + const __dirname = import.meta.dirname; 11 + const __filename = import.meta.filename; 12 + 13 + interface LatestInfo { 14 + readonly url: string; 15 + readonly sha256hash: string; 16 + readonly windsurfVersion: string; 17 + readonly productVersion: string; 18 + } 19 + 20 + const platforms = ["aarch64-darwin", "x86_64-darwin", "x86_64-linux"] as const; 21 + type Platform = (typeof platforms)[number]; 22 + type InfoMap = Record< 23 + Platform, 24 + { 25 + readonly version: string; 26 + readonly vscodeVersion: string; 27 + readonly url: string; 28 + readonly sha256: string; 29 + } 30 + >; 31 + 32 + async function getInfo(targetSystem: "darwin-arm64" | "darwin-x64" | "linux-x64") { 33 + const url = 34 + `https://windsurf-stable.codeium.com/api/update/${targetSystem}/stable/latest` as const; 35 + 36 + const response = await fetch(url); 37 + assert.ok(response.ok, `Failed to fetch ${url}`); 38 + 39 + const latestInfo: LatestInfo = JSON.parse(await response.text()); 40 + assert.ok(latestInfo.sha256hash, "sha256hash is required"); 41 + assert.ok(latestInfo.url, "url is required"); 42 + assert.ok(latestInfo.windsurfVersion, "windsurfVersion is required"); 43 + assert.ok(latestInfo.productVersion, "productVersion is required"); 44 + return { 45 + version: latestInfo.windsurfVersion, 46 + vscodeVersion: latestInfo.productVersion, 47 + url: latestInfo.url, 48 + sha256: latestInfo.sha256hash, 49 + }; 50 + } 51 + 52 + async function main() { 53 + const filePath = path.join(__dirname, "../info.json"); 54 + const oldInfo = JSON.parse( 55 + await fsPromises.readFile(filePath, { encoding: "utf-8" }), 56 + ); 57 + 58 + const info: InfoMap = { 59 + "aarch64-darwin": await getInfo("darwin-arm64"), 60 + "x86_64-darwin": await getInfo("darwin-x64"), 61 + "x86_64-linux": await getInfo("linux-x64"), 62 + }; 63 + if (JSON.stringify(oldInfo) === JSON.stringify(info)) { 64 + console.log("[update] No updates found"); 65 + return; 66 + } 67 + for (const platform of platforms) { 68 + console.log( 69 + `[update] Updating Windsurf ${platform} ${oldInfo[platform].version} -> ${info[platform].version}`, 70 + ); 71 + } 72 + await fsPromises.writeFile( 73 + filePath, 74 + JSON.stringify(info, null, 2) + "\n", 75 + "utf-8", 76 + ); 77 + console.log("[update] Updating Windsurf complete"); 78 + } 79 + 80 + if (process.argv[1] === __filename) { 81 + main(); 82 + }
+4
pkgs/top-level/all-packages.nix
··· 15594 vscodium-fhs = vscodium.fhs; 15595 vscodium-fhsWithPackages = vscodium.fhsWithPackages; 15596 15597 openvscode-server = callPackage ../servers/openvscode-server { 15598 nodejs = nodejs_18; 15599 inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;
··· 15594 vscodium-fhs = vscodium.fhs; 15595 vscodium-fhsWithPackages = vscodium.fhsWithPackages; 15596 15597 + windsurf = callPackage ../by-name/wi/windsurf/package.nix { 15598 + vscode-generic = ../applications/editors/vscode/generic.nix; 15599 + }; 15600 + 15601 openvscode-server = callPackage ../servers/openvscode-server { 15602 nodejs = nodejs_18; 15603 inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;