Add KiCad, SPlayer, and fixed official OpenCode binary.
Replace broken nixpkgs opencode with upstream linux-x64 release to avoid SystemPrompt.environment crashes.
This commit is contained in:
@@ -14,9 +14,12 @@ modules/
|
|||||||
nvidia.nix # RTX 4060(12700F 无核显)
|
nvidia.nix # RTX 4060(12700F 无核显)
|
||||||
gaming.nix # Steam
|
gaming.nix # Steam
|
||||||
printing.nix # CUPS + HP ULD + 中文打印
|
printing.nix # CUPS + HP ULD + 中文打印
|
||||||
apps.nix # QQ/微信包装、开发工具等
|
apps.nix # QQ/微信包装、开发工具、KiCad、SPlayer、opencode 等
|
||||||
fpga.nix # 高云 FPGA(Gowin EDU IDE + 开源工具链)
|
fpga.nix # 高云 FPGA(Gowin EDU IDE + 开源工具链)
|
||||||
pkgs/hp-uld-driver.nix
|
pkgs/
|
||||||
|
hp-uld-driver.nix
|
||||||
|
gowin-eda-edu-ide/ # 高云教育版 IDE(FHS)
|
||||||
|
opencode-bin.nix # 官方 opencode 二进制(规避 nixpkgs 崩溃)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 目标机安装(摘要)
|
## 目标机安装(摘要)
|
||||||
|
|||||||
+7
-1
@@ -142,7 +142,13 @@ in
|
|||||||
fzf
|
fzf
|
||||||
btop
|
btop
|
||||||
|
|
||||||
opencode
|
# EDA / 媒体
|
||||||
|
kicad
|
||||||
|
splayer-next
|
||||||
|
|
||||||
|
# 官方二进制:nixpkgs 版发 prompt 会崩(SystemPrompt.environment)
|
||||||
|
(callPackage ../pkgs/opencode-bin.nix { })
|
||||||
|
bun # opencode 插件安装需要
|
||||||
cursor-cli
|
cursor-cli
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# 官方预编译二进制:nixpkgs 用新版 bun 构建的 opencode 会在发 prompt 时
|
||||||
|
# 触发 SystemPrompt.environment 崩溃(Unexpected server error / a.name)。
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchurl,
|
||||||
|
autoPatchelfHook,
|
||||||
|
makeWrapper,
|
||||||
|
ripgrep,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "opencode";
|
||||||
|
version = "1.18.31";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/anomalyco/opencode/releases/download/v${finalAttrs.version}/opencode-linux-x64.tar.gz";
|
||||||
|
hash = "sha256-6TEr517YA7dBX8Kuq9ofT+k4kSo5Zzdi3Aw4wOEeveQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ stdenv.cc.cc.lib ];
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dm755 opencode $out/bin/.opencode-wrapped
|
||||||
|
makeWrapper $out/bin/.opencode-wrapped $out/bin/opencode \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ ripgrep ]} \
|
||||||
|
--set OPENCODE_DISABLE_AUTOUPDATE true
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "AI coding agent built for the terminal (official binary; nixpkgs build is broken)";
|
||||||
|
homepage = "https://github.com/anomalyco/opencode";
|
||||||
|
changelog = "https://github.com/anomalyco/opencode/releases/tag/v${finalAttrs.version}";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
mainProgram = "opencode";
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
|
};
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user