Compare commits
13 Commits
964aa04878
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 51038c5b6c | |||
| 8f02cf55b2 | |||
| 77fac19667 | |||
| 21673b7396 | |||
| 27a4764e00 | |||
| b26187ae7d | |||
| 539624da38 | |||
| e5a7804eae | |||
| 18e2916e54 | |||
| baa4fcd4c2 | |||
| 63dd4c75bc | |||
| 76536821fb | |||
| af6bedc09d |
@@ -1 +0,0 @@
|
|||||||
/result
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759733170,
|
"lastModified": 1759831965,
|
||||||
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=",
|
"narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
|
"rev": "c9b6fb798541223bbb396d287d16f43520250518",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"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;
|
dontBuild = true;
|
||||||
|
|
||||||
patches = [ ./fix-scripts.patch ];
|
# patches = [ ./fix-scripts.patch ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ungoogled-chromium": {
|
"ungoogled-chromium": {
|
||||||
"version": "141.0.7390.54",
|
"version": "141.0.7390.107",
|
||||||
"deps": {
|
"deps": {
|
||||||
"depot_tools": {
|
"depot_tools": {
|
||||||
"rev": "3f41e54ae17d53d4a39feecad64c3d3e6871b219",
|
"rev": "3f41e54ae17d53d4a39feecad64c3d3e6871b219",
|
||||||
@@ -12,16 +12,16 @@
|
|||||||
"hash": "sha256-WERLGrReUATmn3RhxtmyZcJBxdIY/WZqBDranCLDYEg="
|
"hash": "sha256-WERLGrReUATmn3RhxtmyZcJBxdIY/WZqBDranCLDYEg="
|
||||||
},
|
},
|
||||||
"ungoogled-patches": {
|
"ungoogled-patches": {
|
||||||
"rev": "0.5.2",
|
"rev": "0.5.7",
|
||||||
"hash": "sha256-fLVmW7v6veC1qiwEhDQt6IXYxOgmrYs7chygqAupGPo="
|
"hash": "sha256-FI4iNoS/7yzfWFiJws6fzltiLm4dvH0ztYd0P5GgYqM="
|
||||||
},
|
},
|
||||||
"npmHash": "sha256-i1eQ4YlrWSgY522OlFtGDDPmxE2zd1hDM03AzR8RafE="
|
"npmHash": "sha256-i1eQ4YlrWSgY522OlFtGDDPmxE2zd1hDM03AzR8RafE="
|
||||||
},
|
},
|
||||||
"DEPS": {
|
"DEPS": {
|
||||||
"src": {
|
"src": {
|
||||||
"url": "https://chromium.googlesource.com/chromium/src.git",
|
"url": "https://chromium.googlesource.com/chromium/src.git",
|
||||||
"rev": "b95610d5c4a562d9cd834bc0a098d3316e2f533f",
|
"rev": "1c008349f76ff3a317bf28316fc5008c0120deb4",
|
||||||
"hash": "sha256-jraDPodJBdyFFHS30BcQTZOEUD+h9SFHQrO0GoMhtk8=",
|
"hash": "sha256-NRqWOkGrg/Y4wZi4WQDJ6CvsDpeseVgTc/iAnuPRy/U=",
|
||||||
"recompress": true
|
"recompress": true
|
||||||
},
|
},
|
||||||
"src/third_party/clang-format/script": {
|
"src/third_party/clang-format/script": {
|
||||||
@@ -251,8 +251,8 @@
|
|||||||
},
|
},
|
||||||
"src/third_party/devtools-frontend/src": {
|
"src/third_party/devtools-frontend/src": {
|
||||||
"url": "https://chromium.googlesource.com/devtools/devtools-frontend",
|
"url": "https://chromium.googlesource.com/devtools/devtools-frontend",
|
||||||
"rev": "65f160d43dc97a2e8eb5e1c2814179a519313884",
|
"rev": "9c2c4cc7cf6c82ad460e1f3b49f34bb702d5fe11",
|
||||||
"hash": "sha256-VLMJ/WWCIzk92mmuBdx+P6Gi0ouiXuMGkiR0KVK5GWI="
|
"hash": "sha256-qj1vR0FW2jiR2v18Nv8RqYgy/UEw2rgGUsQ68EhdHos="
|
||||||
},
|
},
|
||||||
"src/third_party/dom_distiller_js/dist": {
|
"src/third_party/dom_distiller_js/dist": {
|
||||||
"url": "https://chromium.googlesource.com/chromium/dom-distiller/dist.git",
|
"url": "https://chromium.googlesource.com/chromium/dom-distiller/dist.git",
|
||||||
@@ -771,8 +771,8 @@
|
|||||||
},
|
},
|
||||||
"src/third_party/webrtc": {
|
"src/third_party/webrtc": {
|
||||||
"url": "https://webrtc.googlesource.com/src.git",
|
"url": "https://webrtc.googlesource.com/src.git",
|
||||||
"rev": "bc7452c444245f7999be5711b1802e900f25540b",
|
"rev": "d2eaa5570fc9959f8dbde32912a16366b8ee75f4",
|
||||||
"hash": "sha256-Bqsd8b14ORREk/J3Tfs7OJXny0FdwUHO/sfCSEMEUSE="
|
"hash": "sha256-vWz+CAlgvavAmoCgy+D5FDGSyYoe15vfKI2fw33K8cc="
|
||||||
},
|
},
|
||||||
"src/third_party/wuffs/src": {
|
"src/third_party/wuffs/src": {
|
||||||
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
|
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
|
||||||
|
|||||||
@@ -17,15 +17,44 @@
|
|||||||
gnugrep,
|
gnugrep,
|
||||||
callPackage,
|
callPackage,
|
||||||
rustc,
|
rustc,
|
||||||
|
runCommand,
|
||||||
|
widevine-cdm,
|
||||||
|
enableWideVine ? false,
|
||||||
|
proprietaryCodecs ? true,
|
||||||
|
cupsSupport ? true,
|
||||||
|
pulseSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
commandLineArgs ? "",
|
||||||
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
upstream-info = (lib.importJSON ./info.json)."ungoogled-chromium";
|
upstream-info = (lib.importJSON ./info.json)."ungoogled-chromium";
|
||||||
unwrapped = callPackage ./unwrapped.nix {
|
unwrapped = callPackage ./unwrapped.nix {
|
||||||
inherit helium-patcher-unwrapped upstream-info;
|
inherit
|
||||||
|
helium-patcher-unwrapped
|
||||||
|
upstream-info
|
||||||
|
proprietaryCodecs
|
||||||
|
cupsSupport
|
||||||
|
pulseSupport
|
||||||
|
;
|
||||||
stdenv = rustc.llvmPackages.stdenv;
|
stdenv = rustc.llvmPackages.stdenv;
|
||||||
};
|
};
|
||||||
helium-patcher-unwrapped = callPackage ./helium-patcher.nix { };
|
helium-patcher-unwrapped = callPackage ./helium-patcher.nix { };
|
||||||
sandboxExecutableName = unwrapped.passthru.sandboxExecutableName;
|
sandboxExecutableName = unwrapped.passthru.sandboxExecutableName;
|
||||||
|
|
||||||
|
chromiumWV =
|
||||||
|
let
|
||||||
|
browser = unwrapped;
|
||||||
|
in
|
||||||
|
if enableWideVine then
|
||||||
|
runCommand (browser.name + "-wv") { version = browser.version; } ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -a ${browser}/* $out/
|
||||||
|
chmod u+w $out/libexec/helium
|
||||||
|
cp -a ${widevine-cdm}/share/google/chrome/WidevineCdm $out/libexec/helium/
|
||||||
|
''
|
||||||
|
else
|
||||||
|
browser;
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "helium-browser";
|
pname = "helium-browser";
|
||||||
@@ -57,7 +86,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildCommand =
|
buildCommand =
|
||||||
let
|
let
|
||||||
browserBinary = "${unwrapped}/libexec/helium/helium";
|
browserBinary = "${chromiumWV}/libexec/helium/helium";
|
||||||
libPath = lib.makeLibraryPath [
|
libPath = lib.makeLibraryPath [
|
||||||
libva
|
libva
|
||||||
pipewire
|
pipewire
|
||||||
@@ -73,7 +102,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
makeWrapper "${browserBinary}" "$out/bin/helium" \
|
makeWrapper "${browserBinary}" "$out/bin/helium" \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
||||||
|
--add-flags ${lib.escapeShellArg commandLineArgs}
|
||||||
ed -v -s "$out/bin/helium" << EOF
|
ed -v -s "$out/bin/helium" << EOF
|
||||||
2i
|
2i
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
electron-source,
|
electron-source,
|
||||||
helium-patcher-unwrapped,
|
helium-patcher-unwrapped,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
|
||||||
|
proprietaryCodecs,
|
||||||
|
cupsSupport,
|
||||||
|
pulseSupport,
|
||||||
}:
|
}:
|
||||||
(
|
(
|
||||||
(chromium.passthru.mkDerivation.override (
|
(chromium.passthru.mkDerivation.override (
|
||||||
@@ -44,7 +48,14 @@
|
|||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
ungoogled = true;
|
ungoogled = true;
|
||||||
ungoogled-chromium = helium-patcher-unwrapped;
|
ungoogled-chromium = helium-patcher-unwrapped;
|
||||||
inherit upstream-info chromiumVersionAtLeast versionRange;
|
inherit
|
||||||
|
upstream-info
|
||||||
|
chromiumVersionAtLeast
|
||||||
|
versionRange
|
||||||
|
proprietaryCodecs
|
||||||
|
cupsSupport
|
||||||
|
pulseSupport
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
rec {
|
rec {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
pname = "helium-browser-unwrapped";
|
pname = "helium-browser-unwrapped";
|
||||||
|
version = "${upstream-info.deps.ungoogled-patches.rev}-${upstream-info.version}";
|
||||||
depsBuildBuild = lib.filter (
|
depsBuildBuild = lib.filter (
|
||||||
d: d != buildPlatformLlvmStdenv && d != buildPlatformLlvmStdenv.cc
|
d: d != buildPlatformLlvmStdenv && d != buildPlatformLlvmStdenv.cc
|
||||||
) base.depsBuildBuild;
|
) base.depsBuildBuild;
|
||||||
|
|||||||
Reference in New Issue
Block a user