feat: base darwin config

This commit is contained in:
2026-02-11 16:57:37 -08:00
parent 4514e4223b
commit de6f3ee6ba
3 changed files with 34 additions and 5 deletions

View File

@@ -18,12 +18,12 @@ let
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "opencode";
version = "1.1.51";
version = "1.1.53";
src = fetchFromGitHub {
owner = "anomalyco";
repo = "opencode";
tag = "v${finalAttrs.version}";
hash = "sha256-i9KR5n6bT0p7xLErlgaq2TAj/B7ZbLd9a+4Czg8q/cI=";
hash = "sha256-VddWpvtoDJlbbesJL6VlP99/NJqkHbN8Rdv1XccNRZM=";
};
node_modules = stdenvNoCC.mkDerivation {
@@ -74,9 +74,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
outputHash =
if stdenvNoCC.hostPlatform.isDarwin then
"sha256-DChoXNWJFlyyAqeiR06BQMLITwVQXy0wvQs58l0d1Xc="
"sha256-m0vAVv8zS8RgU6YpEVbf6l6vilkU+CP/PtAD6U5g/F8="
else
"sha256-tPDRjMcfGWC7TJaQHa3mt7PsZ6Gr5l4lMUOSXoozqoU=";
"sha256-S69x2yRym+h0hbc6wHFOeTxYi9nbBgEJGaZKhUbmdxI=";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
@@ -93,6 +93,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
./root_fix.patch # https://github.com/anomalyco/opencode/pull/7691
];
postPatch = ''
# NOTE: Relax Bun version check to be a warning instead of an error
substituteInPlace packages/script/src/index.ts \
--replace-fail 'throw new Error(`This script requires bun@''${expectedBunVersionRange}' \
'console.warn(`Warning: This script requires bun@''${expectedBunVersionRange}'
'';
configurePhase = ''
runHook preConfigure