feat: add opencode-desktop package with Wayland support

This commit is contained in:
m3tm3re
2026-01-23 17:52:46 +01:00
parent 7a0f5bfd18
commit b76fbefc4b
2 changed files with 37 additions and 18 deletions

View File

@@ -1,8 +1,4 @@
{
pkgs,
inputs ? null,
...
}: {
{ pkgs, inputs ? null, ... }: {
# Custom packages registry
# Each package is defined in its own directory under pkgs/
beads = pkgs.callPackage ./beads { };
@@ -20,5 +16,5 @@
# Imported from flake inputs
opencode = inputs.opencode.packages.${pkgs.system}.opencode;
opencode-desktop = inputs.opencode.packages.${pkgs.system}.desktop;
opencode-desktop = pkgs.callPackage ./opencode-desktop { inherit inputs; };
}

View File

@@ -0,0 +1,23 @@
{ lib, stdenv, symlinkJoin, makeWrapper, inputs ? null, }:
let
opencode-desktop =
inputs.opencode.packages.${stdenv.hostPlatform.system}.desktop;
in symlinkJoin {
name = "opencode-desktop";
paths = [ opencode-desktop ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/opencode-desktop \
--run 'if [[ "$NIXOS_OZONE_WL" == "1" ]]; then export OC_ALLOW_WAYLAND=1; fi'
'';
meta = {
description = "OpenCode Desktop App with Wayland support";
homepage = "https://opencode.ai";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
mainProgram = "opencode-desktop";
};
}