forked from nikkuss/pkgs
switch to nvfetcher and add stuff
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"version": "0.6.7",
|
||||
"srcHash": "sha256-v32Q02ALWw6Upd4rrHGZH7Vt25+xSnKJCNGJob/irgM=",
|
||||
"npmDepsHash": "sha256-oUAHkB4EPuo8YCxi9Y/Lc8cipjJQ05o51MpdUsCjiiQ="
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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}`);
|
||||
@@ -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
|
||||
|
||||
@@ -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/
|
||||
'';
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user