codebase-memory-mcp: use makeFlags and makefile (#536349)

This commit is contained in:
Sandro
2026-06-28 17:16:10 +00:00
committed by GitHub
@@ -14,22 +14,29 @@ stdenv.mkDerivation (finalAttrs: {
rev = "v${finalAttrs.version}";
hash = "sha256-H0l8H2JhPT1Rs0p+CJC1a1qYtnZNgLGe6n7PmM+WvE4=";
};
nativeBuildInputs = [ gnumake ];
buildInputs = [ zlib ];
strictDeps = true;
__structuredAttrs = true;
makefile = "Makefile.cbm";
# scripts/build.sh verifies CC via `file`, which fails on Nix's compiler wrapper.
# Call make directly — mirrors upstream flake.nix.
buildPhase = ''
runHook preBuild
make -j$NIX_BUILD_CORES -f Makefile.cbm cbm CFLAGS_EXTRA='-DCBM_VERSION=\"${finalAttrs.version}\"'
runHook postBuild
'';
makeFlags = [
"cbm"
"CFLAGS_EXTRA='-DCBM_VERSION=\"${finalAttrs.version}\"'"
];
installPhase = ''
runHook preInstall
install -Dm755 build/c/codebase-memory-mcp $out/bin/codebase-memory-mcp
runHook postInstall
'';
meta = {
homepage = "https://github.com/DeusData/codebase-memory-mcp";
description = "High-performance C11 MCP server that indexes codebases into a persistent knowledge graph";