switch to nvfetcher and add stuff
Some checks failed
cache / build (push) Failing after 16m38s

This commit is contained in:
2026-02-19 23:01:59 +04:00
parent b6c43f6802
commit bfc37c6c70
14 changed files with 408 additions and 164 deletions

167
_sources/generated.json Normal file
View File

@@ -0,0 +1,167 @@
{
"ath-tools": {
"cargoLock": null,
"date": "2026-01-09",
"extract": null,
"name": "ath-tools",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"rev": "f4901c23602cb5b5d86202f3f7f4a62323fdbc82",
"sha256": "sha256-8kRhGM0Q/0GLMNGztiUVnyRYLAFMx/w6prgWJ3EIU1c=",
"sparseCheckout": [],
"type": "git",
"url": "https://github.com/qca/qca-swiss-army-knife.git"
},
"version": "f4901c23602cb5b5d86202f3f7f4a62323fdbc82"
},
"base24-schemes": {
"cargoLock": null,
"date": "2026-02-17",
"extract": null,
"name": "base24-schemes",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"rev": "7725e097895102ca2949c7a553b54dca0b2e2667",
"sha256": "sha256-lOw77YOBM6HNuWcLL4Qugn+vr4RxMKV8FgXqFlnyLIo=",
"sparseCheckout": [],
"type": "git",
"url": "https://github.com/tinted-theming/schemes.git"
},
"version": "7725e097895102ca2949c7a553b54dca0b2e2667"
},
"claude-code-acp": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "claude-code-acp",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "zed-industries",
"repo": "claude-code-acp",
"rev": "v0.18.0",
"sha256": "sha256-KZg9z8cyMqMHOfATaT2gcbp0+HkqzecQvAVeHN+bCYg=",
"sparseCheckout": [],
"type": "github"
},
"version": "v0.18.0"
},
"flightcore": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "flightcore",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "R2NorthstarTools",
"repo": "FlightCore",
"rev": "v3.2.0",
"sha256": "sha256-MFnW9cXFzqmdtC31r8cRcihV3NjGAC6+2/DnNVMheCI=",
"sparseCheckout": [],
"type": "github"
},
"version": "v3.2.0"
},
"qebspil": {
"cargoLock": null,
"date": "2025-10-25",
"extract": null,
"name": "qebspil",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": true,
"leaveDotGit": false,
"name": null,
"rev": "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0",
"sha256": "sha256-kWUXzeYWNxGgmjt/p9yozrWc5ouUs0XXBRfiFMlu+QQ=",
"sparseCheckout": [],
"type": "git",
"url": "https://github.com/stephan-gh/qebspil.git"
},
"version": "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0"
},
"radare2-ghidra": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "radare2-ghidra",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "radareorg",
"repo": "r2ghidra",
"rev": "6.1.0",
"sha256": "sha256-KmzS4Q39ztiGc8rnUqcx5tUXuTCK8WcQrFelKzvaOEw=",
"sparseCheckout": [],
"type": "github"
},
"version": "6.1.0"
},
"radare2-mcp": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "radare2-mcp",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "radareorg",
"repo": "radare2-mcp",
"rev": "1.5.6",
"sha256": "sha256-oR7+6djPmrEWpomqNPnw+ciEgXWsB/pmJPvpt37z21w=",
"sparseCheckout": [],
"type": "github"
},
"version": "1.5.6"
},
"slbounce": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "slbounce",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "TravMurav",
"repo": "slbounce",
"rev": "v5",
"sha256": "sha256-w+0SKR0A/hcFU6iFEOgyG+vWwgAWF8h9D0/X7GSFm7w=",
"sparseCheckout": [],
"type": "github"
},
"version": "v5"
}
}

106
_sources/generated.nix Normal file
View File

@@ -0,0 +1,106 @@
# This file was generated by nvfetcher, please do not modify it manually.
{
fetchgit,
fetchurl,
fetchFromGitHub,
dockerTools,
}:
{
ath-tools = {
pname = "ath-tools";
version = "f4901c23602cb5b5d86202f3f7f4a62323fdbc82";
src = fetchgit {
url = "https://github.com/qca/qca-swiss-army-knife.git";
rev = "f4901c23602cb5b5d86202f3f7f4a62323fdbc82";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sparseCheckout = [ ];
sha256 = "sha256-8kRhGM0Q/0GLMNGztiUVnyRYLAFMx/w6prgWJ3EIU1c=";
};
date = "2026-01-09";
};
base24-schemes = {
pname = "base24-schemes";
version = "7725e097895102ca2949c7a553b54dca0b2e2667";
src = fetchgit {
url = "https://github.com/tinted-theming/schemes.git";
rev = "7725e097895102ca2949c7a553b54dca0b2e2667";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sparseCheckout = [ ];
sha256 = "sha256-lOw77YOBM6HNuWcLL4Qugn+vr4RxMKV8FgXqFlnyLIo=";
};
date = "2026-02-17";
};
claude-code-acp = {
pname = "claude-code-acp";
version = "v0.18.0";
src = fetchFromGitHub {
owner = "zed-industries";
repo = "claude-code-acp";
rev = "v0.18.0";
fetchSubmodules = false;
sha256 = "sha256-KZg9z8cyMqMHOfATaT2gcbp0+HkqzecQvAVeHN+bCYg=";
};
};
flightcore = {
pname = "flightcore";
version = "v3.2.0";
src = fetchFromGitHub {
owner = "R2NorthstarTools";
repo = "FlightCore";
rev = "v3.2.0";
fetchSubmodules = false;
sha256 = "sha256-MFnW9cXFzqmdtC31r8cRcihV3NjGAC6+2/DnNVMheCI=";
};
};
qebspil = {
pname = "qebspil";
version = "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0";
src = fetchgit {
url = "https://github.com/stephan-gh/qebspil.git";
rev = "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0";
fetchSubmodules = true;
deepClone = false;
leaveDotGit = false;
sparseCheckout = [ ];
sha256 = "sha256-kWUXzeYWNxGgmjt/p9yozrWc5ouUs0XXBRfiFMlu+QQ=";
};
date = "2025-10-25";
};
radare2-ghidra = {
pname = "radare2-ghidra";
version = "6.1.0";
src = fetchFromGitHub {
owner = "radareorg";
repo = "r2ghidra";
rev = "6.1.0";
fetchSubmodules = false;
sha256 = "sha256-KmzS4Q39ztiGc8rnUqcx5tUXuTCK8WcQrFelKzvaOEw=";
};
};
radare2-mcp = {
pname = "radare2-mcp";
version = "1.5.6";
src = fetchFromGitHub {
owner = "radareorg";
repo = "radare2-mcp";
rev = "1.5.6";
fetchSubmodules = false;
sha256 = "sha256-oR7+6djPmrEWpomqNPnw+ciEgXWsB/pmJPvpt37z21w=";
};
};
slbounce = {
pname = "slbounce";
version = "v5";
src = fetchFromGitHub {
owner = "TravMurav";
repo = "slbounce";
rev = "v5";
fetchSubmodules = false;
sha256 = "sha256-w+0SKR0A/hcFU6iFEOgyG+vWwgAWF8h9D0/X7GSFm7w=";
};
};
}

View File

@@ -68,9 +68,12 @@
# ); # );
in in
{ {
overlays.default = final: prev: flatPackages; overlays = final: prev: flatPackages;
packages = flatPackages; packages = flatPackages;
checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages; checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages;
devShells.default = pkgs.mkShellNoCC {
packages = [ pkgs.nvfetcher ];
};
} }
) )
) )

32
nvfetcher.toml Normal file
View File

@@ -0,0 +1,32 @@
[claude-code-acp]
src.github = "zed-industries/claude-code-acp"
fetch.github = "zed-industries/claude-code-acp"
[flightcore]
src.github = "R2NorthstarTools/FlightCore"
fetch.github = "R2NorthstarTools/FlightCore"
[radare2-mcp]
src.github = "radareorg/radare2-mcp"
fetch.github = "radareorg/radare2-mcp"
[radare2-ghidra]
src.github = "radareorg/r2ghidra"
fetch.github = "radareorg/r2ghidra"
[slbounce]
src.github = "TravMurav/slbounce"
fetch.github = "TravMurav/slbounce"
[base24-schemes]
src.git = "https://github.com/tinted-theming/schemes.git"
fetch.git = "https://github.com/tinted-theming/schemes.git"
[qebspil]
src.git = "https://github.com/stephan-gh/qebspil.git"
fetch.git = "https://github.com/stephan-gh/qebspil.git"
git.fetchSubmodules = true
[ath-tools]
src.git = "https://github.com/qca/qca-swiss-army-knife.git"
fetch.git = "https://github.com/qca/qca-swiss-army-knife.git"

View File

@@ -4,8 +4,10 @@ python3.pkgs.buildPythonApplication rec {
name = "ath12k-tools"; name = "ath12k-tools";
pyproject = false; pyproject = false;
inherit src; inherit src;
sourceRoot = "source/tools/scripts/ath12k"; sourceRoot = "${src.name}/tools/scripts/ath12k";
installPhase = '' installPhase = ''
ls -la
pwd
install -Dm755 "ath12k-bdencoder" "$out/bin/ath12k-bdencoder" install -Dm755 "ath12k-bdencoder" "$out/bin/ath12k-bdencoder"
install -Dm755 "ath12k-check" "$out/bin/ath12k-check" install -Dm755 "ath12k-check" "$out/bin/ath12k-check"
install -Dm755 "ath12k-fw-repo" "$out/bin/ath12k-fw-repo" install -Dm755 "ath12k-fw-repo" "$out/bin/ath12k-fw-repo"

View File

@@ -2,16 +2,11 @@
lib, lib,
newScope, newScope,
callPackage, callPackage,
fetchFromGitHub,
... ...
}: }:
let let
src = fetchFromGitHub { sources = callPackage ../../../../_sources/generated.nix { };
owner = "qca"; inherit (sources.ath-tools) src;
repo = "qca-swiss-army-knife";
rev = "7c191e5530d32391105653b276ab587d2af9e02a";
hash = "sha256-iE4lqyr3zmLcgFnsrDvQ/CKUV15ijqmIbUIs9sgMECg=";
};
in in
lib.makeScope newScope (self: { lib.makeScope newScope (self: {
ath12k-tools = self.callPackage ./ath12k-tools.nix { inherit src; }; ath12k-tools = self.callPackage ./ath12k-tools.nix { inherit src; };

View File

@@ -1,19 +1,17 @@
{ {
lib, lib,
callPackage,
stdenv, stdenv,
fetchFromGitHub,
... ...
}: }:
let
sources = callPackage ../../../../_sources/generated.nix { };
in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "base24-schemes"; pname = "base24-schemes";
version = "unstable-2025-04-18"; version = "unstable-${sources.base24-schemes.date}";
src = fetchFromGitHub { inherit (sources.base24-schemes) src;
owner = "tinted-theming";
repo = "schemes";
rev = "28c26a621123ad4ebd5bbfb34ab39421c0144bdd";
hash = "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=";
};
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall

View File

@@ -1,5 +0,0 @@
{
"version": "0.6.7",
"srcHash": "sha256-v32Q02ALWw6Upd4rrHGZH7Vt25+xSnKJCNGJob/irgM=",
"npmDepsHash": "sha256-oUAHkB4EPuo8YCxi9Y/Lc8cipjJQ05o51MpdUsCjiiQ="
}

View File

@@ -1,36 +0,0 @@
{
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";
};
}

View File

@@ -1,77 +0,0 @@
#! /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}`);

View File

@@ -1,23 +1,20 @@
{ {
lib, lib,
callPackage,
stdenv, stdenv,
fetchFromGitHub,
gnumake, gnumake,
dtc, dtc,
glibc, glibc,
}: }:
stdenv.mkDerivation rec { let
sources = callPackage ../../../../_sources/generated.nix { };
in
stdenv.mkDerivation {
pname = "qebspil"; pname = "qebspil";
version = "unstable-2025-10-25"; version = "unstable-${sources.qebspil.date}";
src = fetchFromGitHub { inherit (sources.qebspil) src;
owner = "stephan-gh";
repo = "qebspil";
rev = "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0";
hash = "sha256-kWUXzeYWNxGgmjt/p9yozrWc5ouUs0XXBRfiFMlu+QQ=";
fetchSubmodules = true;
};
nativeBuildInputs = [ nativeBuildInputs = [
gnumake gnumake

View File

@@ -0,0 +1,70 @@
{
callPackage,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
radare2,
}:
let
sources = callPackage ../../../../_sources/generated.nix { };
ghidra-native = fetchFromGitHub {
owner = "radareorg";
repo = "ghidra-native";
rev = "0.6.4";
hash = "sha256-DFvHM/erGE9wFjcB3Dlyhv4oebzXwe2yGG+GzLaY7hU=";
};
pugixml = fetchFromGitHub {
owner = "zeux";
repo = "pugixml";
rev = "v1.15";
hash = "sha256-t/57lg32KgKPc7qRGQtO/GOwHRqoj78lllSaE/A8Z9Q=";
};
in
stdenv.mkDerivation {
inherit (sources.radare2-ghidra) pname version src;
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
radare2
];
preConfigure = ''
cp -r ${ghidra-native} subprojects/ghidra-native
chmod -R u+w subprojects/ghidra-native
# Overlay packagefiles (meson.build, etc.)
cp -r subprojects/packagefiles/ghidra-native/* subprojects/ghidra-native/
# Apply diff patches listed in the wrap file
for p in subprojects/packagefiles/ghidra-native/patches/*.patch; do
[ -f "$p" ] || continue
echo "Applying patch: $p"
patch -d subprojects/ghidra-native -p1 < "$p" || true
done
# Fix sleighc link: it needs ghidra_decompiler_static for symbols from pcodeinject.cc
substituteInPlace subprojects/ghidra-native/meson.build \
--replace-fail "link_with: slgh_static," \
"link_with: [slgh_static, ghidra_decompiler_static],"
# Install into $out instead of radare2's store path
substituteInPlace meson.build \
--replace-fail "res = run_command(['radare2','-HR2_LIBR_PLUGINS'], capture:true, check:false)" \
"res = run_command(['false'], capture:true, check:false)"
# pugixml subproject
cp -r ${pugixml} subprojects/pugixml
chmod -R u+w subprojects/pugixml
cp -r subprojects/packagefiles/pugixml/* subprojects/pugixml/
'';
}

View File

@@ -1,23 +1,17 @@
{ {
callPackage,
stdenv, stdenv,
fetchFromGitHub,
meson, meson,
ninja, ninja,
pkg-config, pkg-config,
radare2, radare2,
}: }:
stdenv.mkDerivation rec { let
pname = "radare2-mcp"; sources = callPackage ../../../../_sources/generated.nix { };
version = "1.5.4"; in
stdenv.mkDerivation {
src = fetchFromGitHub { inherit (sources.radare2-mcp) pname version src;
owner = "radareorg";
repo = "radare2-mcp";
rev = version;
hash = "sha256-YdniXuAiwR/oEFM14/LyxLL3HVI2K2/np8wQETkj01A=";
# hash = "sha256-6Xy0oAR1DbdwxPgCQZVB3igSNUNbjFiNwUNTobRm070=";
};
nativeBuildInputs = [ nativeBuildInputs = [
meson meson

View File

@@ -1,5 +1,6 @@
{ {
lib, lib,
callPackage,
stdenv, stdenv,
fetchzip, fetchzip,
fetchgit, fetchgit,
@@ -9,6 +10,8 @@
}: }:
let let
sources = callPackage ../../../../_sources/generated.nix { };
aarch64-system-register-xmls = fetchzip { aarch64-system-register-xmls = fetchzip {
url = "https://developer.arm.com/-/media/developer/products/architecture/armv8-a-architecture/2020-06/SysReg_xml_v86A-2020-06.tar.gz"; url = "https://developer.arm.com/-/media/developer/products/architecture/armv8-a-architecture/2020-06/SysReg_xml_v86A-2020-06.tar.gz";
stripRoot = false; stripRoot = false;
@@ -52,14 +55,9 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "slbounce"; pname = "slbounce";
version = "5"; version = lib.removePrefix "v" sources.slbounce.version;
src = fetchFromGitHub { inherit (sources.slbounce) src;
owner = "TravMurav";
repo = "slbounce";
tag = "v${finalAttrs.version}";
hash = "sha256-w+0SKR0A/hcFU6iFEOgyG+vWwgAWF8h9D0/X7GSFm7w=";
};
nativeBuildInputs = [ dtc ]; nativeBuildInputs = [ dtc ];