Created
May 25, 2026 22:34
-
-
Save piq9117/e72246073a74a49c542d8a3e6ec912bf to your computer and use it in GitHub Desktop.
grok build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "grok build"; | |
| inputs.nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable; | |
| outputs = {self, nixpkgs}: | |
| let | |
| forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; | |
| nixpkgsFor = forAllSystems(system: import nixpkgs { | |
| inherit system; | |
| }); | |
| in { | |
| packages = forAllSystems(system: | |
| let | |
| pkgs = nixpkgsFor.${system}; | |
| version = "0.1.219"; | |
| in { | |
| default = pkgs.stdenv.mkDerivation { | |
| pname = "grok-build"; | |
| inherit version; | |
| src = pkgs.fetchurl { | |
| url = "https://x.ai/cli/grok-${version}-linux-x86_64"; | |
| sha256 = "sha256-xxNw50CPmWm7LESDPvuFlD0nF1juqvYhCOcLeOITCss="; | |
| }; | |
| dontUnpack = true; | |
| dontStrip = true; | |
| installPhase = '' | |
| mkdir -p $out/bin | |
| cp $src $out/bin/grok | |
| chmod +x $out/bin/grok | |
| ''; | |
| }; | |
| }); | |
| devShells = forAllSystems(system: | |
| let | |
| pkgs = nixpkgsFor.${system}; | |
| in { | |
| default = pkgs.mkShell { | |
| buildInputs = [ | |
| self.packages.${system}.default | |
| ]; | |
| shellHook = '' | |
| export PS1='[$PWD]\n❄ ' | |
| ''; | |
| }; | |
| }); | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment