summaryrefslogtreecommitdiffhomepage
path: root/nix
diff options
context:
space:
mode:
authorShoubhit Dash <[email protected]>2026-04-16 17:30:14 +0530
committerShoubhit Dash <[email protected]>2026-04-16 17:30:14 +0530
commit2e18a603f0ea24154908e748493fd4bfaa74fc00 (patch)
treeb723e00af2821b213573b16fa199b64babd5f1f5 /nix
parent9819eb04614fd607cacb07d754052f1531a82331 (diff)
parent7341718f9234b0cf3a8758c87e91d2006b71bff6 (diff)
downloadopencode-2e18a603f0ea24154908e748493fd4bfaa74fc00.tar.gz
opencode-2e18a603f0ea24154908e748493fd4bfaa74fc00.zip
merge dev
Diffstat (limited to 'nix')
-rw-r--r--nix/hashes.json8
-rw-r--r--nix/opencode.nix37
2 files changed, 22 insertions, 23 deletions
diff --git a/nix/hashes.json b/nix/hashes.json
index d827b203d..e9795e5c3 100644
--- a/nix/hashes.json
+++ b/nix/hashes.json
@@ -1,8 +1,8 @@
{
"nodeModules": {
- "x86_64-linux": "sha256-285KZ7rZLRoc6XqCZRHc25NE+mmpGh/BVeMpv8aPQtQ=",
- "aarch64-linux": "sha256-qIwmY4TP4CI7R7G6A5OMYRrorVNXjkg25tTtVpIHm2o=",
- "aarch64-darwin": "sha256-RwvnZQhdYZ0u7h7evyfxuPLHHX9eO/jXTAxIFc8B+IE=",
- "x86_64-darwin": "sha256-vVj40al+TEeMpbe5XG2GmJEpN+eQAvtr9W0T98l5PBE="
+ "x86_64-linux": "sha256-NJAK+cPjwn+2ojDLyyDmBQyx2pD+rILetp7VCylgjek=",
+ "aarch64-linux": "sha256-q8NTtFQJoyM7TTvErGA6RtmUscxoZKD/mj9N6S5YhkA=",
+ "aarch64-darwin": "sha256-/ccoSZNLef6j9j14HzpVqhKCR+czM3mhPKPH51mHO24=",
+ "x86_64-darwin": "sha256-6Pd10sMHL/5ZoWNvGPwPn4/AIs1TKjt/3gFyrVpBaE0="
}
}
diff --git a/nix/opencode.nix b/nix/opencode.nix
index b629d0b55..4deac157e 100644
--- a/nix/opencode.nix
+++ b/nix/opencode.nix
@@ -7,7 +7,6 @@
sysctl,
makeBinaryWrapper,
models-dev,
- ripgrep,
installShellFiles,
versionCheckHook,
writableTmpDirAsHomeHook,
@@ -52,25 +51,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
-
- wrapProgram $out/bin/opencode \
- --prefix PATH : ${
- lib.makeBinPath (
- [
- ripgrep
+ 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
]
- # bun runs sysctl to detect if dunning on rosetta2
- ++ lib.optional stdenvNoCC.hostPlatform.isDarwin sysctl
- )
- }
-
- runHook postInstall
- '';
+ }
+ ''
+ + ''
+ runHook postInstall
+ '';
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
# trick yargs into also generating zsh completions