Files
avcf/shell.nix
T
adrien 8522ece371 test: C compilation tests for generated template code
- Add gcc and mesa to shell.nix for C compilation
- Fix warning icon overlap with ::after message by adding padding-right
  to proccall-header and end-header when warnings are active
- Add tests/compile/ with Makefile (pkg-config based) and run.js
  which generates C source from block-like data structures, then
  compiles with gcc -Wall -Wextra -fsyntax-only
- Tests cover: console template, simple error, error merge,
  sequential errors, value-return error style
2026-06-23 01:01:03 +02:00

57 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
sdl3
mesa # for GL/gl.h
nodejs
gcc
];
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)"
'';
}