GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/nix/opencode.nix at dev · ildella/opencode Expand file tree/ Copy pathopencode.nixMore file actions 102 lines (86 loc) · 2.4 KB / Copy pathopencode.nixFile metadata and controls102 lines (86 loc) · 2.4 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 { lib, stdenvNoCC, callPackage, bun, nodejs, sysctl, makeBinaryWrapper, models-dev, ripgrep, installShellFiles, versionCheckHook, writableTmpDirAsHomeHook, node_modules ? callPackage ./node-modules.nix { }, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "opencode"; inherit (node_modules) version src; inherit node_modules; nativeBuildInputs = [ bun nodejs # for patchShebangs node_modules installShellFiles makeBinaryWrapper models-dev writableTmpDirAsHomeHook ]; configurePhase = '' runHook preConfigure cp -R ${finalAttrs.node_modules}/. . patchShebangs node_modules patchShebangs packages/*/node_modules runHook postConfigure ''; env.MODELS_DEV_API_JSON = "${models-dev}/dist/_api.json"; env.OPENCODE_DISABLE_MODELS_FETCH = true; env.OPENCODE_VERSION = finalAttrs.version; env.OPENCODE_CHANNEL = "prod"; buildPhase = '' runHook preBuild cd ./packages/opencode bun --bun ./script/build.ts --single --skip-install bun --bun ./script/schema.ts schema.json 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 ] # bun runs sysctl to detect if running 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 installShellCompletion --cmd opencode \ --bash <($out/bin/opencode completion) \ --zsh <(SHELL=/bin/zsh $out/bin/opencode completion) ''; nativeInstallCheckInputs = [ versionCheckHook writableTmpDirAsHomeHook ]; doInstallCheck = true; versionCheckKeepEnvironment = [ "HOME" "OPENCODE_DISABLE_MODELS_FETCH" ]; versionCheckProgramArg = "--version"; passthru = { jsonschema = "${placeholder "out"}/share/opencode/schema.json"; env = finalAttrs.env; }; meta = { description = "The open source coding agent"; homepage = "https://opencode.ai"; license = lib.licenses.mit; mainProgram = "opencode"; inherit (node_modules.meta) platforms; }; }) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |