using official grok now

This commit is contained in:
ari committed 2026-09-17 12:16:43 -04:00
1 parent f2f79d8a4d
commit 92b2bf7f31
8 files changed
+35 -107

No files matched your search

+6 -7
View File
@@ -5,13 +5,12 @@ Packages here are exposed via an overlay defined in `modules/core/default.nix`.
## Contents
| Package | Description |
|---|---|
| `grok-cli/` | xAI Grok CLI — prebuilt static binary, fetched per-platform. Exposed as `pkgs.grok-cli`. |
| `ds4/` | DwarfStar (`antirez/ds4`) DeepSeek V4 local inference engine, built from source. Backend-parameterized (`backend = "cpu" \| "rocm" \| "cuda"`); tracks `main` and builds per-host. Exposed as `pkgs.ds4` (cpu, default), `pkgs.ds4-rocm` (Strix Halo / gfx1151), `pkgs.ds4-cuda`. Installs the `ds4`, `ds4-server`, `ds4-bench`, `ds4-eval`, `ds4-agent` binaries plus a `ds4-download-model` helper for fetching GGUF weights. Model weights are a runtime concern and not packaged. |
| `colibri/` | colibrì (`JustVugg/colibri`) — GLM-5.2/OLMoE local inference engine, built from source, pinned to a tagged release. Backend-parameterized (`backend = "cpu" \| "rocm"`). Exposed as `pkgs.colibri` (cpu, default), `pkgs.colibri-rocm` (Strix Halo / gfx1151). Installs the `coli` CLI (wrapped with the Python env its converter/bench subcommands need) plus the bundled `colibri`/`olmoe` engine binaries. Model weights are a runtime concern and not packaged. |
| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. |
| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). |
| Package | Description |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ds4/` | DwarfStar (`antirez/ds4`) DeepSeek V4 local inference engine, built from source. Backend-parameterized (`backend = "cpu" \| "rocm" \| "cuda"`); tracks `main` and builds per-host. Exposed as `pkgs.ds4` (cpu, default), `pkgs.ds4-rocm` (Strix Halo / gfx1151), `pkgs.ds4-cuda`. Installs the `ds4`, `ds4-server`, `ds4-bench`, `ds4-eval`, `ds4-agent` binaries plus a `ds4-download-model` helper for fetching GGUF weights. Model weights are a runtime concern and not packaged. |
| `colibri/` | colibrì (`JustVugg/colibri`) — GLM-5.2/OLMoE local inference engine, built from source, pinned to a tagged release. Backend-parameterized (`backend = "cpu" \| "rocm"`). Exposed as `pkgs.colibri` (cpu, default), `pkgs.colibri-rocm` (Strix Halo / gfx1151). Installs the `coli` CLI (wrapped with the Python env its converter/bench subcommands need) plus the bundled `colibri`/`olmoe` engine binaries. Model weights are a runtime concern and not packaged. |
| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. |
| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). |
## Adding a New Package
-80
View File
@@ -1,80 +0,0 @@
{ lib, stdenvNoCC, fetchurl }:
# Grok CLI — xAI's command-line coding agent.
#
# Upstream ships prebuilt, self-contained binaries (static-pie ELF on Linux,
# Mach-O on macOS) via the installer at https://x.ai/cli/install.sh. There is no
# public source build, so we just fetch the right artifact per platform and drop
# it in $out/bin. No patchelf/autoPatchelfHook is needed — the Linux binary is
# statically linked.
#
# To bump: set `version` and refresh the hashes. The latest stable version is at
# https://storage.googleapis.com/grok-build-public-artifacts/cli/stable
# and the per-platform hash is:
# nix hash file --type sha256 --sri \
# <(curl -fsSL https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-<version>-<platform>)
let
version = "0.2.33";
baseUrl = "https://storage.googleapis.com/grok-build-public-artifacts/cli";
# nix system → { upstream platform slug, artifact hash }
sources = {
"x86_64-linux" = {
platform = "linux-x86_64";
hash = "sha256-DAd7As5qRqZkm8G7eSva05acwbL6ZzCmTPm67opkKEM=";
};
"aarch64-linux" = {
platform = "linux-aarch64";
hash = "sha256-Csl/20RdR5/skH2Zdv0FeuBwU7wHdXSRZ1iCp0lB88A=";
};
"x86_64-darwin" = {
platform = "macos-x86_64";
hash = "sha256-UzLQHZ2UXljG2rfmGxXPA0jLkHoung/UnVBtlvV3Uxg=";
};
"aarch64-darwin" = {
platform = "macos-aarch64";
hash = "sha256-ifFeGIepNtlhYCJj4kmZuQD/mjZGjizzKSQSjOS1LoA=";
};
};
system = stdenvNoCC.hostPlatform.system;
source = sources.${system} or (throw "grok-cli: unsupported system '${system}'");
in
stdenvNoCC.mkDerivation {
pname = "grok-cli";
inherit version;
src = fetchurl {
url = "${baseUrl}/grok-${version}-${source.platform}";
inherit (source) hash;
};
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm755 "$src" "$out/bin/grok"
# Upstream installs an `agent` alias alongside `grok` (the binary dispatches
# on argv[0]); preserve it.
ln -s grok "$out/bin/agent"
runHook postInstall
'';
# The Linux artifact is static-pie linked, so the only check we can run is the
# one the upstream installer does: confirm it executes.
doInstallCheck = stdenvNoCC.hostPlatform.isLinux;
installCheckPhase = ''
"$out/bin/grok" --version </dev/null >/dev/null
'';
meta = {
description = "xAI's Grok command-line coding agent";
homepage = "https://x.ai/cli";
license = lib.licenses.unfree;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = builtins.attrNames sources;
mainProgram = "grok";
};
}