- Add flake structure with overlay and packages exports - Add manim-mcp-server as first packaged MCP server - Add README.org with usage instructions and package templates - Add packages/default.nix as package aggregator - Add overlays/default.nix for nixpkgs integration
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
python3,
|
|
manim,
|
|
}:
|
|
|
|
let
|
|
python = python3.withPackages (
|
|
ps: with ps; [
|
|
mcp
|
|
fastmcp
|
|
]
|
|
);
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "manim-mcp-server";
|
|
version = "0.0.1-unstable";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "abhiemj";
|
|
repo = "manim-mcp-server";
|
|
rev = "da23214426a56ce3ba4da39b0718d64cf97cd23c";
|
|
hash = "sha256-orR3CtFiSucErPJzIF0Si4s16LH1d+ZhyUKo6PC966I=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin $out/lib/manim-mcp-server
|
|
cp src/manim_server.py $out/lib/manim-mcp-server/
|
|
|
|
makeWrapper ${python}/bin/python $out/bin/manim-mcp-server \
|
|
--add-flags "$out/lib/manim-mcp-server/manim_server.py" \
|
|
--set MANIM_EXECUTABLE "${manim}/bin/manim"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "MCP server that executes Manim animation code and returns generated videos";
|
|
homepage = "https://github.com/abhiemj/manim-mcp-server";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
mainProgram = "manim-mcp-server";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|