Files
avcf/shell.nix
adrien d53f92482d feat: switch from C to LLVM IR code generation
- Replace all C code generation with LLVM IR (flat DFA model with
  bb_ prefix labels to avoid SSA value name collisions)
- Remove c.min.js, add llvm.min.js highlight.js language definition
- Update shell.nix: gcc -> clang, remove sdl3/mesa deps
- Download LLVM Language Reference to docs/llvm/LangRef.html
- Rename #c-code to #ir-code in HTML, JS, and CSS
- Replace _generateIncludes with _generateLLVMDecls for extern
  function declarations using LLVM_DECL_MAP
- Add string pool (CodeGen.allocString, stringGlobal, llvmStringArg)
  for LLVM IR global string constants with getelementptr references
2026-06-23 03:39:22 +02:00

55 lines
1.3 KiB
Nix

{ pkgs ? import <nixpkgs> {} }:
let
codegraph = pkgs.stdenv.mkDerivation {
pname = "codegraph";
version = "1.0.1";
src = pkgs.fetchurl {
url = "https://github.com/colbymchenry/codegraph/releases/download/v1.0.1/codegraph-linux-x64.tar.gz";
sha256 = "d45a068f44596a85c7ba7d0ef924eaf7103fbbf3cafbeb668127daff60a52228";
};
sourceRoot = "codegraph-linux-x64";
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = with pkgs; [
stdenv.cc.cc
zlib
openssl
];
installPhase = ''
mkdir -p $out/bin
cp -r . $out/
chmod +x $out/node $out/bin/codegraph
'';
meta = {
description = "Code understanding and indexing tool for AI coding agents";
homepage = "https://github.com/colbymchenry/codegraph";
license = pkgs.lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
};
in
pkgs.mkShell {
packages = with pkgs; [
opencode
python3
codegraph
nodejs
clang
];
shellHook = ''
echo "━━━ development shell ━━━"
echo " opencode $(opencode --version 2>&1 || true)"
echo " codegraph $(codegraph --version 2>&1 || true)"
echo " python $(python --version 2>&1 || true)"
echo " nodejs $(node --version 2>&1 || true)"
'';
}