feat: add opencode-desktop package with Wayland support
All checks were successful
Update Nix Packages with nix-update / nix-update (push) Successful in 8m21s
All checks were successful
Update Nix Packages with nix-update / nix-update (push) Successful in 8m21s
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
{
|
{ pkgs, inputs ? null, ... }: {
|
||||||
pkgs,
|
|
||||||
inputs ? null,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# Custom packages registry
|
# Custom packages registry
|
||||||
# Each package is defined in its own directory under pkgs/
|
# Each package is defined in its own directory under pkgs/
|
||||||
beads = pkgs.callPackage ./beads { };
|
beads = pkgs.callPackage ./beads { };
|
||||||
@@ -20,5 +16,5 @@
|
|||||||
|
|
||||||
# Imported from flake inputs
|
# Imported from flake inputs
|
||||||
opencode = inputs.opencode.packages.${pkgs.system}.opencode;
|
opencode = inputs.opencode.packages.${pkgs.system}.opencode;
|
||||||
opencode-desktop = inputs.opencode.packages.${pkgs.system}.desktop;
|
opencode-desktop = pkgs.callPackage ./opencode-desktop { inherit inputs; };
|
||||||
}
|
}
|
||||||
|
|||||||
23
pkgs/opencode-desktop/default.nix
Normal file
23
pkgs/opencode-desktop/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user