Compare commits
8 Commits
18e2916e54
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 51038c5b6c | |||
| 8f02cf55b2 | |||
| 77fac19667 | |||
| 21673b7396 | |||
| 27a4764e00 | |||
| b26187ae7d | |||
| 539624da38 | |||
| e5a7804eae |
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1759733170,
|
||||
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=",
|
||||
"lastModified": 1759831965,
|
||||
"narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
|
||||
"rev": "c9b6fb798541223bbb396d287d16f43520250518",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
5
pkgs/by-name/cl/claude-code-acp/info.json
Normal file
5
pkgs/by-name/cl/claude-code-acp/info.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": "0.6.7",
|
||||
"srcHash": "sha256-v32Q02ALWw6Upd4rrHGZH7Vt25+xSnKJCNGJob/irgM=",
|
||||
"npmDepsHash": "sha256-oUAHkB4EPuo8YCxi9Y/Lc8cipjJQ05o51MpdUsCjiiQ="
|
||||
}
|
||||
36
pkgs/by-name/cl/claude-code-acp/package.nix
Normal file
36
pkgs/by-name/cl/claude-code-acp/package.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
let
|
||||
info = lib.importJSON ./info.json;
|
||||
in
|
||||
buildNpmPackage {
|
||||
pname = "claude-code-acp";
|
||||
version = info.version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zed-industries";
|
||||
repo = "claude-code-acp";
|
||||
rev = "v${info.version}";
|
||||
hash = info.srcHash;
|
||||
};
|
||||
|
||||
npmDepsHash = info.npmDepsHash;
|
||||
|
||||
# The package uses TypeScript and builds before publishing
|
||||
npmBuildScript = "build";
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.mjs;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Use Claude Code from any ACP client such as Zed";
|
||||
homepage = "https://github.com/zed-industries/claude-code-acp";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "claude-code-acp";
|
||||
};
|
||||
}
|
||||
77
pkgs/by-name/cl/claude-code-acp/update.mjs
Executable file
77
pkgs/by-name/cl/claude-code-acp/update.mjs
Executable file
@@ -0,0 +1,77 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
/*
|
||||
#! nix-shell -i zx -p nix-prefetch-github -p zx
|
||||
*/
|
||||
|
||||
import { readFileSync, writeFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
// GitHub API endpoint for latest release
|
||||
const GITHUB_API = "https://api.github.com/repos/zed-industries/claude-code-acp/releases/latest";
|
||||
|
||||
// Read current info.json
|
||||
const infoPath = join(__dirname, "info.json");
|
||||
const currentInfo = JSON.parse(readFileSync(infoPath, "utf-8"));
|
||||
|
||||
console.log(`Current version: ${currentInfo.version}`);
|
||||
|
||||
// Fetch latest release from GitHub
|
||||
console.log("Fetching latest release from GitHub...");
|
||||
const response = await fetch(GITHUB_API);
|
||||
const release = await response.json();
|
||||
|
||||
const latestVersion = release.tag_name.replace(/^v/, ""); // Remove 'v' prefix
|
||||
console.log(`Latest version: ${latestVersion}`);
|
||||
|
||||
if (currentInfo.version === latestVersion) {
|
||||
console.log("Already up to date!");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Update version
|
||||
currentInfo.version = latestVersion;
|
||||
|
||||
// Prefetch source hash
|
||||
console.log("Prefetching source hash...");
|
||||
const srcHashOutput = await $`nix-prefetch-github zed-industries claude-code-acp --rev v${latestVersion}`;
|
||||
const srcPrefetch = JSON.parse(srcHashOutput.stdout);
|
||||
currentInfo.srcHash = srcPrefetch.hash;
|
||||
|
||||
console.log(`Source hash: ${currentInfo.srcHash}`);
|
||||
|
||||
// Write temporary info.json to get npmDepsHash
|
||||
writeFileSync(infoPath, JSON.stringify(currentInfo, null, 2) + "\n");
|
||||
|
||||
// Prefetch npm dependencies hash
|
||||
console.log("Prefetching npm dependencies hash...");
|
||||
try {
|
||||
// This will fail with the expected hash in the error message
|
||||
await $`nix build .#claude-code-acp`;
|
||||
|
||||
} catch (error) {
|
||||
// Extract hash from error message
|
||||
const errorOutput = error.stderr;
|
||||
const hashMatch = errorOutput.match(/got:\s+(sha256-[A-Za-z0-9+/=]+)/);
|
||||
|
||||
if (hashMatch) {
|
||||
currentInfo.npmDepsHash = hashMatch[1];
|
||||
console.log(`npm deps hash: ${currentInfo.npmDepsHash}`);
|
||||
} else {
|
||||
console.error("Failed to extract npmDepsHash from build output");
|
||||
console.error("You may need to update it manually by running:");
|
||||
console.error(` nix-build -A claude-code-acp`);
|
||||
console.error("and copying the hash from the error message");
|
||||
}
|
||||
}
|
||||
|
||||
// Write final info.json
|
||||
writeFileSync(infoPath, JSON.stringify(currentInfo, null, 2) + "\n");
|
||||
|
||||
console.log("\nUpdate complete!");
|
||||
console.log(`Version: ${currentInfo.version}`);
|
||||
console.log(`Source hash: ${currentInfo.srcHash}`);
|
||||
console.log(`npm deps hash: ${currentInfo.npmDepsHash}`);
|
||||
6281
pkgs/by-name/fl/flightcore/cargo-lock.patch
Normal file
6281
pkgs/by-name/fl/flightcore/cargo-lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
72
pkgs/by-name/fl/flightcore/package.nix
Normal file
72
pkgs/by-name/fl/flightcore/package.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
jq,
|
||||
moreutils,
|
||||
fetchNpmDeps,
|
||||
cargo-tauri,
|
||||
glib-networking,
|
||||
nodejs,
|
||||
npmHooks,
|
||||
openssl,
|
||||
pkg-config,
|
||||
webkitgtk_4_1,
|
||||
wrapGAppsHook4,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "flightcore";
|
||||
version = "3.2.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "R2NorthstarTools";
|
||||
repo = "FlightCore";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-MFnW9cXFzqmdtC31r8cRcihV3NjGAC6+2/DnNVMheCI=";
|
||||
};
|
||||
patches = [ ./cargo-lock.patch ];
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
src = finalAttrs.src;
|
||||
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.cargoRoot}";
|
||||
hash = "sha256-Jh0DAX4fGy2Z1+hpq+bkU/VYy2JAL2u+neUIsQ2QXBU=";
|
||||
patchFlags = "-p2";
|
||||
inherit (finalAttrs) patches;
|
||||
};
|
||||
postPatch = ''
|
||||
jq '.bundle.createUpdaterArtifacts = false' src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json
|
||||
'';
|
||||
npmDeps = fetchNpmDeps {
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
||||
src = "${finalAttrs.src}/src-vue";
|
||||
hash = "sha256-QhUPkCBK1kcAF7gByFxlg8Ca9PLF3evCl0QYEPP/Q2c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo-tauri.hook
|
||||
|
||||
nodejs
|
||||
npmHooks.npmConfigHook
|
||||
|
||||
pkg-config
|
||||
|
||||
jq
|
||||
moreutils
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook4 ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
||||
glib-networking
|
||||
openssl
|
||||
webkitgtk_4_1
|
||||
];
|
||||
|
||||
cargoRoot = "src-tauri";
|
||||
npmRoot = "src-vue";
|
||||
|
||||
buildAndTestSubdir = finalAttrs.cargoRoot;
|
||||
|
||||
meta = {
|
||||
description = "FlightCore A Northstar installer, updater, and mod-manager";
|
||||
};
|
||||
})
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
patches = [ ./fix-scripts.patch ];
|
||||
# patches = [ ./fix-scripts.patch ];
|
||||
|
||||
buildInputs = [
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ungoogled-chromium": {
|
||||
"version": "141.0.7390.54",
|
||||
"version": "141.0.7390.107",
|
||||
"deps": {
|
||||
"depot_tools": {
|
||||
"rev": "3f41e54ae17d53d4a39feecad64c3d3e6871b219",
|
||||
@@ -12,16 +12,16 @@
|
||||
"hash": "sha256-WERLGrReUATmn3RhxtmyZcJBxdIY/WZqBDranCLDYEg="
|
||||
},
|
||||
"ungoogled-patches": {
|
||||
"rev": "0.5.2",
|
||||
"hash": "sha256-fLVmW7v6veC1qiwEhDQt6IXYxOgmrYs7chygqAupGPo="
|
||||
"rev": "0.5.7",
|
||||
"hash": "sha256-FI4iNoS/7yzfWFiJws6fzltiLm4dvH0ztYd0P5GgYqM="
|
||||
},
|
||||
"npmHash": "sha256-i1eQ4YlrWSgY522OlFtGDDPmxE2zd1hDM03AzR8RafE="
|
||||
},
|
||||
"DEPS": {
|
||||
"src": {
|
||||
"url": "https://chromium.googlesource.com/chromium/src.git",
|
||||
"rev": "b95610d5c4a562d9cd834bc0a098d3316e2f533f",
|
||||
"hash": "sha256-jraDPodJBdyFFHS30BcQTZOEUD+h9SFHQrO0GoMhtk8=",
|
||||
"rev": "1c008349f76ff3a317bf28316fc5008c0120deb4",
|
||||
"hash": "sha256-NRqWOkGrg/Y4wZi4WQDJ6CvsDpeseVgTc/iAnuPRy/U=",
|
||||
"recompress": true
|
||||
},
|
||||
"src/third_party/clang-format/script": {
|
||||
@@ -251,8 +251,8 @@
|
||||
},
|
||||
"src/third_party/devtools-frontend/src": {
|
||||
"url": "https://chromium.googlesource.com/devtools/devtools-frontend",
|
||||
"rev": "65f160d43dc97a2e8eb5e1c2814179a519313884",
|
||||
"hash": "sha256-VLMJ/WWCIzk92mmuBdx+P6Gi0ouiXuMGkiR0KVK5GWI="
|
||||
"rev": "9c2c4cc7cf6c82ad460e1f3b49f34bb702d5fe11",
|
||||
"hash": "sha256-qj1vR0FW2jiR2v18Nv8RqYgy/UEw2rgGUsQ68EhdHos="
|
||||
},
|
||||
"src/third_party/dom_distiller_js/dist": {
|
||||
"url": "https://chromium.googlesource.com/chromium/dom-distiller/dist.git",
|
||||
@@ -771,8 +771,8 @@
|
||||
},
|
||||
"src/third_party/webrtc": {
|
||||
"url": "https://webrtc.googlesource.com/src.git",
|
||||
"rev": "bc7452c444245f7999be5711b1802e900f25540b",
|
||||
"hash": "sha256-Bqsd8b14ORREk/J3Tfs7OJXny0FdwUHO/sfCSEMEUSE="
|
||||
"rev": "d2eaa5570fc9959f8dbde32912a16366b8ee75f4",
|
||||
"hash": "sha256-vWz+CAlgvavAmoCgy+D5FDGSyYoe15vfKI2fw33K8cc="
|
||||
},
|
||||
"src/third_party/wuffs/src": {
|
||||
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
rec {
|
||||
inherit stdenv;
|
||||
pname = "helium-browser-unwrapped";
|
||||
version = "${upstream-info.deps.ungoogled-patches.rev}-${upstream-info.version}";
|
||||
depsBuildBuild = lib.filter (
|
||||
d: d != buildPlatformLlvmStdenv && d != buildPlatformLlvmStdenv.cc
|
||||
) base.depsBuildBuild;
|
||||
|
||||
Reference in New Issue
Block a user