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.
1.5 KiB
opencode & opencode-desktop
opencode (CLI)
The standalone opencode CLI is not packaged here. Use the well-maintained
upstream flake instead:
{
inputs.llm-agents.url = "github:numtide/llm-agents.nix";
}
nix run github:numtide/llm-agents.nix#opencode
opencode-desktop
opencode-desktop is provided as a pure pass-through from the upstream
flake input anomalyco/opencode
(tracked on the dev branch). It is the official Electron desktop app built
upstream via nix/desktop.nix.
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):opencode.url = "github:anomalyco/opencode/dev";It intentionally does not follow this repo's
nixpkgs: upstream pins anode_modulesfixed-output derivation hash innix/hashes.jsonagainst its own nixpkgs snapshot, so following would risk FOD hash mismatches. -
Registry (
pkgs/default.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.