feat: update opencode to 1.1.60 with bun patch and desktop outputHashes

This commit is contained in:
m3tm3re
2026-02-12 14:47:49 +01:00
parent 909acf61d3
commit 0c598b2442
4 changed files with 140 additions and 26 deletions

View File

@@ -2,7 +2,15 @@
pkgs,
inputs ? null,
...
}: {
}: let
# Upstream opencode v1.1.60 strictly requires Bun ^1.3.9 but nixpkgs provides 1.3.8
# We patch package.json to match the environment version to fix the build
opencode = inputs.opencode.packages.${pkgs.system}.opencode.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
substituteInPlace package.json --replace-fail '"packageManager": "bun@1.3.9"' '"packageManager": "bun@1.3.8"'
'';
});
in {
# Custom packages registry
# Each package is defined in its own directory under pkgs/
beads = pkgs.callPackage ./beads {};
@@ -21,6 +29,6 @@
zellij-ps = pkgs.callPackage ./zellij-ps {};
# Imported from flake inputs
opencode = inputs.opencode.packages.${pkgs.system}.opencode;
# opencode-desktop = pkgs.callPackage ./opencode-desktop { inherit inputs; };
inherit opencode;
opencode-desktop = pkgs.callPackage ./opencode-desktop {inherit inputs;};
}