Skip to content

Conversation

@kremovtort
Copy link

Summary
This PR adds first-class Nix flake support for RepoMapper, making the project easy to build/run reproducibly via Nix.
What’s included

  • New flake.nix that packages this repo as repomapper and exposes two executables on PATH: repomap and repomap-mcp (flake.nix:1).
  • New flake.lock to pin nixpkgs/flake-utils for reproducible builds (flake.lock:1).
  • apps outputs so users can run without installing:
    • nix run .#repomap
    • nix run .#repomap-mcp
  • devShell output (nix develop) with Python 3.13 + all runtime dependencies (flake.nix:101).
    Packaging approach
  • The derivation installs the Python modules plus the queries/ directory into $out/share/repomapper and wraps python -m repomap / python -m repomap_server with PYTHONPATH pointing at that directory (flake.nix:41).
  • This ensures scm.py can still locate Tree-sitter query files via paths relative to the module location.
    Bug fix included
  • repomap.py now correctly handles RepoMap.get_repo_map() returning (map_content, file_report) so the CLI works with the current RepoMap API (repomap.py:195).
    How to test
  • Build: nix build .#repomapper
  • CLI: ./result/bin/repomap --help
  • MCP server: nix run .#repomap-mcp (expected to start the FastMCP server / show banner)
  • Dev env: nix develop (then run python -m repomap --help)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant