Skip to content

Commit dd268e5

Browse files
committed
{opencode,opencode-desktop}: 1.4.11 -> 1.14.18
1 parent 36d283b commit dd268e5

2 files changed

Lines changed: 18 additions & 27 deletions

File tree

pkgs/by-name/op/opencode-desktop/package.nix

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
glib,
77
glib-networking,
88
gst_all_1,
9-
gtk3,
9+
gtk4,
1010
jq,
1111
lib,
12-
libappindicator-gtk3,
12+
libappindicator,
1313
librsvg,
1414
libsoup_3,
15-
makeBinaryWrapper,
15+
makeWrapper,
1616
nodejs,
1717
opencode,
1818
openssl,
@@ -24,12 +24,6 @@
2424
wrapGAppsHook4,
2525
}:
2626

27-
let
28-
gtk = gtk3;
29-
libappindicator-gtk = libappindicator-gtk3;
30-
libsoup = libsoup_3;
31-
webkitgtk = webkitgtk_4_1;
32-
in
3327
rustPlatform.buildRustPackage (finalAttrs: {
3428
pname = "opencode-desktop";
3529
inherit (opencode)
@@ -51,7 +45,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
5145
cargo
5246
rustc
5347
jq
54-
makeBinaryWrapper
48+
makeWrapper
5549
]
5650
++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ wrapGAppsHook4 ];
5751

@@ -60,12 +54,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
6054
dbus
6155
glib
6256
glib-networking
63-
gtk
64-
libappindicator-gtk
57+
gtk4
58+
libappindicator
6559
librsvg
66-
libsoup
60+
libsoup_3
6761
openssl
68-
webkitgtk
62+
webkitgtk_4_1
6963
]
7064
++ (with gst_all_1; [
7165
gst-plugins-bad # fakevideosink
@@ -75,8 +69,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
7569
);
7670

7771
tauriBuildFlags = [
78-
"--config"
79-
"tauri.conf.json"
8072
"--config"
8173
"tauri.prod.conf.json"
8274
"--no-sign"

pkgs/by-name/op/opencode/package.nix

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
stdenvNoCC.mkDerivation (finalAttrs: {
1818
pname = "opencode";
19-
version = "1.4.11";
19+
version = "1.14.18";
2020

2121
src = fetchFromGitHub {
2222
owner = "anomalyco";
2323
repo = "opencode";
2424
tag = "v${finalAttrs.version}";
25-
hash = "sha256-jlxR2BODV8wk0sP4Kkyza7Zr5I+Q003gldCfp2eYOt8=";
25+
hash = "sha256-wEjksPEPzEe2BCySqjorMXrbnBWNCp+YAaCiZWV2ZIc=";
2626
};
2727

2828
node_modules = stdenvNoCC.mkDerivation {
@@ -44,12 +44,15 @@ stdenvNoCC.mkDerivation (finalAttrs: {
4444
buildPhase = ''
4545
runHook preBuild
4646
47+
export BUN_INSTALL_CACHE_DIR=$(mktemp -d)
4748
bun install \
4849
--cpu="*" \
4950
--frozen-lockfile \
51+
--filter ./ \
5052
--filter ./packages/app \
5153
--filter ./packages/desktop \
5254
--filter ./packages/opencode \
55+
--filter ./packages/shared \
5356
--ignore-scripts \
5457
--no-progress \
5558
--os="*"
@@ -72,7 +75,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
7275
# NOTE: Required else we get errors that our fixed-output derivation references store paths
7376
dontFixup = true;
7477

75-
outputHash = "sha256-rF+l0Hho0QEvMS5jaImhMlhKjjf1R66X20R6lEZcZeg=";
78+
outputHash = "sha256-KZ/tfg84DNa56VglMWmExE3R219BXwxSmhKnLiQWOV4=";
7679
outputHashAlgo = "sha256";
7780
outputHashMode = "recursive";
7881
};
@@ -106,14 +109,14 @@ stdenvNoCC.mkDerivation (finalAttrs: {
106109
env.MODELS_DEV_API_JSON = "${models-dev}/dist/_api.json";
107110
env.OPENCODE_DISABLE_MODELS_FETCH = true;
108111
env.OPENCODE_VERSION = finalAttrs.version;
109-
env.OPENCODE_CHANNEL = "stable";
112+
env.OPENCODE_CHANNEL = "latest";
110113

111114
buildPhase = ''
112115
runHook preBuild
113116
114117
cd ./packages/opencode
115118
bun --bun ./script/build.ts --single --skip-install
116-
bun --bun ./script/schema.ts config.json tui.json
119+
bun --bun ./script/schema.ts schema.json
117120
118121
runHook postBuild
119122
'';
@@ -134,8 +137,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
134137
)
135138
}
136139
137-
install -Dm644 config.json $out/share/opencode/config.json
138-
install -Dm644 tui.json $out/share/opencode/tui.json
140+
install -Dm644 schema.json $out/share/opencode/schema.json
139141
140142
runHook postInstall
141143
'';
@@ -158,10 +160,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
158160
versionCheckProgramArg = "--version";
159161

160162
passthru = {
161-
jsonschema = {
162-
config = "${placeholder "out"}/share/opencode/config.json";
163-
tui = "${placeholder "out"}/share/opencode/tui.json";
164-
};
163+
jsonschema = "${placeholder "out"}/share/opencode/schema.json";
165164
updateScript = nix-update-script {
166165
extraArgs = [
167166
"--subpackage"

0 commit comments

Comments
 (0)