Skip to content

Commit bbd5faf

Browse files
chore(nix): remove external ripgrep (#22482)
1 parent aeb7d99 commit bbd5faf

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

nix/opencode.nix

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
sysctl,
88
makeBinaryWrapper,
99
models-dev,
10-
ripgrep,
1110
installShellFiles,
1211
versionCheckHook,
1312
writableTmpDirAsHomeHook,
@@ -52,25 +51,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
5251
runHook postBuild
5352
'';
5453

55-
installPhase = ''
56-
runHook preInstall
57-
58-
install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode
59-
install -Dm644 schema.json $out/share/opencode/schema.json
60-
61-
wrapProgram $out/bin/opencode \
62-
--prefix PATH : ${
63-
lib.makeBinPath (
64-
[
65-
ripgrep
54+
installPhase =
55+
''
56+
runHook preInstall
57+
58+
install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode
59+
install -Dm644 schema.json $out/share/opencode/schema.json
60+
''
61+
# bun runs sysctl to detect if dunning on rosetta2
62+
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
63+
wrapProgram $out/bin/opencode \
64+
--prefix PATH : ${
65+
lib.makeBinPath [
66+
sysctl
6667
]
67-
# bun runs sysctl to detect if dunning on rosetta2
68-
++ lib.optional stdenvNoCC.hostPlatform.isDarwin sysctl
69-
)
70-
}
71-
72-
runHook postInstall
73-
'';
68+
}
69+
''
70+
+ ''
71+
runHook postInstall
72+
'';
7473

7574
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
7675
# trick yargs into also generating zsh completions

0 commit comments

Comments
 (0)