diff --git a/_sources/generated.json b/_sources/generated.json new file mode 100644 index 0000000..f44a484 --- /dev/null +++ b/_sources/generated.json @@ -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" + } +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix new file mode 100644 index 0000000..6ddfca2 --- /dev/null +++ b/_sources/generated.nix @@ -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="; + }; + }; +} diff --git a/flake.nix b/flake.nix index b6a094c..a29a965 100644 --- a/flake.nix +++ b/flake.nix @@ -68,9 +68,12 @@ # ); in { - overlays.default = final: prev: flatPackages; + overlays = final: prev: flatPackages; packages = flatPackages; checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages; + devShells.default = pkgs.mkShellNoCC { + packages = [ pkgs.nvfetcher ]; + }; } ) ) diff --git a/nvfetcher.toml b/nvfetcher.toml new file mode 100644 index 0000000..18b0750 --- /dev/null +++ b/nvfetcher.toml @@ -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" diff --git a/pkgs/by-name/at/ath-tools/ath12k-tools.nix b/pkgs/by-name/at/ath-tools/ath12k-tools.nix index d3f7595..590508f 100644 --- a/pkgs/by-name/at/ath-tools/ath12k-tools.nix +++ b/pkgs/by-name/at/ath-tools/ath12k-tools.nix @@ -4,8 +4,10 @@ python3.pkgs.buildPythonApplication rec { name = "ath12k-tools"; pyproject = false; inherit src; - sourceRoot = "source/tools/scripts/ath12k"; + sourceRoot = "${src.name}/tools/scripts/ath12k"; installPhase = '' + ls -la + pwd install -Dm755 "ath12k-bdencoder" "$out/bin/ath12k-bdencoder" install -Dm755 "ath12k-check" "$out/bin/ath12k-check" install -Dm755 "ath12k-fw-repo" "$out/bin/ath12k-fw-repo" diff --git a/pkgs/by-name/at/ath-tools/package.nix b/pkgs/by-name/at/ath-tools/package.nix index 8a8b410..75e8fe8 100644 --- a/pkgs/by-name/at/ath-tools/package.nix +++ b/pkgs/by-name/at/ath-tools/package.nix @@ -2,16 +2,11 @@ lib, newScope, callPackage, - fetchFromGitHub, ... }: let - src = fetchFromGitHub { - owner = "qca"; - repo = "qca-swiss-army-knife"; - rev = "7c191e5530d32391105653b276ab587d2af9e02a"; - hash = "sha256-iE4lqyr3zmLcgFnsrDvQ/CKUV15ijqmIbUIs9sgMECg="; - }; + sources = callPackage ../../../../_sources/generated.nix { }; + inherit (sources.ath-tools) src; in lib.makeScope newScope (self: { ath12k-tools = self.callPackage ./ath12k-tools.nix { inherit src; }; diff --git a/pkgs/by-name/ba/base24-schemes/package.nix b/pkgs/by-name/ba/base24-schemes/package.nix index f785b75..02cacd7 100644 --- a/pkgs/by-name/ba/base24-schemes/package.nix +++ b/pkgs/by-name/ba/base24-schemes/package.nix @@ -1,19 +1,17 @@ { lib, + callPackage, stdenv, - fetchFromGitHub, ... }: +let + sources = callPackage ../../../../_sources/generated.nix { }; +in stdenv.mkDerivation (finalAttrs: { pname = "base24-schemes"; - version = "unstable-2025-04-18"; + version = "unstable-${sources.base24-schemes.date}"; - src = fetchFromGitHub { - owner = "tinted-theming"; - repo = "schemes"; - rev = "28c26a621123ad4ebd5bbfb34ab39421c0144bdd"; - hash = "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY="; - }; + inherit (sources.base24-schemes) src; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/cl/claude-code-acp/info.json b/pkgs/by-name/cl/claude-code-acp/info.json deleted file mode 100644 index 380453d..0000000 --- a/pkgs/by-name/cl/claude-code-acp/info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "0.6.7", - "srcHash": "sha256-v32Q02ALWw6Upd4rrHGZH7Vt25+xSnKJCNGJob/irgM=", - "npmDepsHash": "sha256-oUAHkB4EPuo8YCxi9Y/Lc8cipjJQ05o51MpdUsCjiiQ=" -} diff --git a/pkgs/by-name/cl/claude-code-acp/package.nix b/pkgs/by-name/cl/claude-code-acp/package.nix deleted file mode 100644 index 3364fe0..0000000 --- a/pkgs/by-name/cl/claude-code-acp/package.nix +++ /dev/null @@ -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"; - }; -} diff --git a/pkgs/by-name/cl/claude-code-acp/update.mjs b/pkgs/by-name/cl/claude-code-acp/update.mjs deleted file mode 100755 index b8675e3..0000000 --- a/pkgs/by-name/cl/claude-code-acp/update.mjs +++ /dev/null @@ -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}`); diff --git a/pkgs/by-name/qe/qebspil/package.nix b/pkgs/by-name/qe/qebspil/package.nix index c7fef09..dc48847 100644 --- a/pkgs/by-name/qe/qebspil/package.nix +++ b/pkgs/by-name/qe/qebspil/package.nix @@ -1,23 +1,20 @@ { lib, + callPackage, stdenv, - fetchFromGitHub, gnumake, dtc, glibc, }: -stdenv.mkDerivation rec { +let + sources = callPackage ../../../../_sources/generated.nix { }; +in +stdenv.mkDerivation { pname = "qebspil"; - version = "unstable-2025-10-25"; + version = "unstable-${sources.qebspil.date}"; - src = fetchFromGitHub { - owner = "stephan-gh"; - repo = "qebspil"; - rev = "8e4d9e676a3b3afe136cda9b953a2139ff1a32d0"; - hash = "sha256-kWUXzeYWNxGgmjt/p9yozrWc5ouUs0XXBRfiFMlu+QQ="; - fetchSubmodules = true; - }; + inherit (sources.qebspil) src; nativeBuildInputs = [ gnumake diff --git a/pkgs/by-name/ra/radare2-ghidra/package.nix b/pkgs/by-name/ra/radare2-ghidra/package.nix new file mode 100644 index 0000000..08b57ab --- /dev/null +++ b/pkgs/by-name/ra/radare2-ghidra/package.nix @@ -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/ + ''; +} diff --git a/pkgs/by-name/ra/radare2-mcp/package.nix b/pkgs/by-name/ra/radare2-mcp/package.nix index 76a0931..5604d80 100644 --- a/pkgs/by-name/ra/radare2-mcp/package.nix +++ b/pkgs/by-name/ra/radare2-mcp/package.nix @@ -1,23 +1,17 @@ { + callPackage, stdenv, - fetchFromGitHub, meson, ninja, pkg-config, radare2, }: -stdenv.mkDerivation rec { - pname = "radare2-mcp"; - version = "1.5.4"; - - src = fetchFromGitHub { - owner = "radareorg"; - repo = "radare2-mcp"; - rev = version; - hash = "sha256-YdniXuAiwR/oEFM14/LyxLL3HVI2K2/np8wQETkj01A="; - # hash = "sha256-6Xy0oAR1DbdwxPgCQZVB3igSNUNbjFiNwUNTobRm070="; - }; +let + sources = callPackage ../../../../_sources/generated.nix { }; +in +stdenv.mkDerivation { + inherit (sources.radare2-mcp) pname version src; nativeBuildInputs = [ meson diff --git a/pkgs/by-name/sl/slbounce/package.nix b/pkgs/by-name/sl/slbounce/package.nix index fdaca34..f2023c2 100644 --- a/pkgs/by-name/sl/slbounce/package.nix +++ b/pkgs/by-name/sl/slbounce/package.nix @@ -1,5 +1,6 @@ { lib, + callPackage, stdenv, fetchzip, fetchgit, @@ -9,6 +10,8 @@ }: let + sources = callPackage ../../../../_sources/generated.nix { }; + 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"; stripRoot = false; @@ -52,14 +55,9 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "slbounce"; - version = "5"; + version = lib.removePrefix "v" sources.slbounce.version; - src = fetchFromGitHub { - owner = "TravMurav"; - repo = "slbounce"; - tag = "v${finalAttrs.version}"; - hash = "sha256-w+0SKR0A/hcFU6iFEOgyG+vWwgAWF8h9D0/X7GSFm7w="; - }; + inherit (sources.slbounce) src; nativeBuildInputs = [ dtc ];