summaryrefslogtreecommitdiffhomepage
path: root/nix
diff options
context:
space:
mode:
authorShoubhit Dash <[email protected]>2026-04-19 12:28:15 +0530
committerGitHub <[email protected]>2026-04-19 06:58:15 +0000
commit889087c9662a41438867f2b2b7a974f58dfda245 (patch)
treee9caa6ad88f7bdde7418b67ab15e6ef0174049ee /nix
parent7f3b64c7c49147143eb7c544a019c103d70b890f (diff)
downloadopencode-889087c9662a41438867f2b2b7a974f58dfda245.tar.gz
opencode-889087c9662a41438867f2b2b7a974f58dfda245.zip
fix(ripgrep): restore native rg backend (#22773)
Co-authored-by: LukeParkerDev <[email protected]>
Diffstat (limited to 'nix')
-rw-r--r--nix/opencode.nix37
1 files changed, 19 insertions, 18 deletions
diff --git a/nix/opencode.nix b/nix/opencode.nix
index 4deac157e..b629d0b55 100644
--- a/nix/opencode.nix
+++ b/nix/opencode.nix
@@ -7,6 +7,7 @@
sysctl,
makeBinaryWrapper,
models-dev,
+ ripgrep,
installShellFiles,
versionCheckHook,
writableTmpDirAsHomeHook,
@@ -51,25 +52,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postBuild
'';
- installPhase =
- ''
- runHook preInstall
-
- install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode
- install -Dm644 schema.json $out/share/opencode/schema.json
- ''
- # bun runs sysctl to detect if dunning on rosetta2
- + lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
- wrapProgram $out/bin/opencode \
- --prefix PATH : ${
- lib.makeBinPath [
- sysctl
+ installPhase = ''
+ runHook preInstall
+
+ install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode
+ install -Dm644 schema.json $out/share/opencode/schema.json
+
+ wrapProgram $out/bin/opencode \
+ --prefix PATH : ${
+ lib.makeBinPath (
+ [
+ ripgrep
]
- }
- ''
- + ''
- runHook postInstall
- '';
+ # bun runs sysctl to detect if dunning on rosetta2
+ ++ lib.optional stdenvNoCC.hostPlatform.isDarwin sysctl
+ )
+ }
+
+ runHook postInstall
+ '';
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
# trick yargs into also generating zsh completions