51 lines
1.7 KiB
Nix
51 lines
1.7 KiB
Nix
{
|
|
description = "codebase-memory-mcp — C11 MCP server for codebase indexing";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
systems = [ "aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux" ];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
|
in
|
|
{
|
|
packages = forAllSystems (pkgs: {
|
|
default = pkgs.stdenv.mkDerivation {
|
|
pname = "codebase-memory-mcp";
|
|
version = "0.6.0";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [ pkgs.gnumake ];
|
|
buildInputs = [ pkgs.zlib ];
|
|
|
|
# scripts/build.sh verifies the compiler via `file`, which fails on Nix
|
|
# because CC is a bash wrapper script rather than a binary. Call make
|
|
# directly to bypass that check; the Nix stdenv already guarantees the
|
|
# correct compiler and target architecture.
|
|
buildPhase = ''
|
|
make -j$NIX_BUILD_CORES -f Makefile.cbm cbm
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -Dm755 build/c/codebase-memory-mcp $out/bin/codebase-memory-mcp
|
|
'';
|
|
|
|
meta = {
|
|
description = "MCP server that builds and queries a semantic graph of your codebase";
|
|
homepage = "https://github.com/DeusData/codebase-memory-mcp";
|
|
license = nixpkgs.lib.licenses.mit;
|
|
mainProgram = "codebase-memory-mcp";
|
|
platforms = systems;
|
|
};
|
|
};
|
|
});
|
|
|
|
devShells = forAllSystems (pkgs: {
|
|
default = pkgs.mkShell {
|
|
inputsFrom = [ self.packages.${pkgs.system}.default ];
|
|
};
|
|
});
|
|
};
|
|
}
|