feat: re-add opencode-desktop as pass-through from anomalyco/opencode

Expose the opencode-desktop Electron app as a package via a pure
pass-through from a new 'opencode' flake input
(github:anomalyco/opencode/dev).

The input intentionally does NOT follow nixpkgs: upstream pins a
node_modules fixed-output derivation hash in nix/hashes.json against
its own nixpkgs snapshot, so following would risk FOD hash mismatches.

- flake.nix: add 'opencode' input (own nixpkgs, dev branch)
- pkgs/default.nix: opencode-desktop pass-through
- docs/packages/opencode.md + README.md: refreshed (Electron, not Tauri)
- CHANGELOG: unreleased entry

Verified: nix flake show lists opencode-desktop (all 4 systems);
output opencode-desktop-1.18.9+f720490 builds & wraps electron-41.
This commit is contained in:
m3tam3re
2026-07-30 07:01:22 +02:00
parent d73d377b93
commit 8d46992bd1
6 changed files with 90 additions and 24 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ These packages are imported directly from flake inputs with minor modifications:
| Package | Source | Modification | Location |
|---------|--------|-------------|----------|
| `opencode-desktop` | `inputs.opencode` | Tauri desktop wrapper + Wayland fix | `pkgs/opencode-desktop/` |
| `opencode-desktop` | `inputs.opencode` | Electron desktop app (pure pass-through) | `pkgs/default.nix` |
## Adding Package Documentation
+41 -22
View File
@@ -1,37 +1,56 @@
# opencode (Deprecated)
# opencode & opencode-desktop
> **Note**: The `opencode` package has been removed from this repository.
## opencode (CLI)
## Why was it removed?
OpenCode (CLI version) has been removed because there is now a well-maintained upstream repository for AI coding tools:
The standalone `opencode` CLI is **not** packaged here. Use the well-maintained
upstream flake instead:
**[numtide/llm-agents.nix](https://github.com/numtide/llm-agents.nix)**
This repository provides Nix packages for various AI coding agents, including OpenCode and others, with active maintenance and updates.
## What should I use instead?
Use the [llm-agents.nix](https://github.com/numtide/llm-agents.nix) flake directly:
```nix
{
inputs = {
llm-agents.url = "github:numtide/llm-agents.nix";
};
outputs = { inputs, ... }: {
# Access packages via inputs.llm-agents.packages.${system}
};
inputs.llm-agents.url = "github:numtide/llm-agents.nix";
}
```
Or run directly:
```bash
nix run github:numtide/llm-agents.nix#opencode
```
## What about opencode-desktop?
## opencode-desktop
The `opencode-desktop` package remains available in this repository as it includes a Wayland support workaround for [upstream issue #11755](https://github.com/opencode-ai/opencode/issues/11755). Once this issue is resolved upstream, `opencode-desktop` may also be removed in favor of the llm-agents.nix repository.
`opencode-desktop` is provided as a **pure pass-through** from the upstream
flake input [`anomalyco/opencode`](https://github.com/anomalyco/opencode)
(tracked on the `dev` branch). It is the official Electron desktop app built
upstream via `nix/desktop.nix`.
```bash
nix build git+https://code.m3ta.dev/m3tam3re/nixpkgs#opencode-desktop
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#opencode-desktop
```
### How it is wired
- **Flake input** (`flake.nix`):
```nix
opencode.url = "github:anomalyco/opencode/dev";
```
It intentionally does **not** follow this repo's `nixpkgs`: upstream pins a
`node_modules` fixed-output derivation hash in `nix/hashes.json` against its
own nixpkgs snapshot, so following would risk FOD hash mismatches.
- **Registry** (`pkgs/default.nix`):
```nix
opencode-desktop = inputs.opencode.packages.${system}.opencode-desktop;
```
No local derivation exists — the package is imported as-is.
### Wayland
The upstream wrapper already passes `--ozone-platform-hint=auto` (plus Wayland
window decorations and IME flags) when `NIXOS_OZONE_WL` is set, so no local
Wayland wrapper is required.