- Add httpx>=0.28.0 to services/bff/pyproject.toml for the planned TMDB movie search proxy (M4.3). - Add grpcio-health-checking>=1.83.1 to services/worker/pyproject.toml for Worker gRPC health probing (M3.4/M5.3), updating uv.lock via uv lock. - Copy sibling workspace manifests (pyproject.toml, README.md) in services/worker/Dockerfile and services/bff/Dockerfile so uv sync --frozen --no-dev resolves the monorepo lockfile. - Set ENV DATABASE_URL="sqlite+aiosqlite:////data/magnetflix.sqlite3" in services/worker/Dockerfile to match docs/deployment.md when run standalone. - Update CLAUDE.md and flake.nix shellHook to use uv sync --all-packages so syncing does not uninstall workspace member packages. - Update Makefile generate target to invoke buf directly when already inside nix develop.
61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{
|
|
description = "MagNetFlix — Movie acquisition pipeline development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
name = "magnetflix-dev-shell";
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
buf
|
|
gnumake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
# Python & package management
|
|
python312
|
|
uv
|
|
|
|
# Local torrent daemon for dev/testing
|
|
transmission_4
|
|
|
|
# Database tooling
|
|
sqlite
|
|
|
|
# Container tooling
|
|
docker-compose
|
|
];
|
|
|
|
shellHook = ''
|
|
echo "🎬 Entering MagNetFlix DevShell"
|
|
echo " • Python: $(python3 --version)"
|
|
echo " • UV: $(uv --version)"
|
|
echo " • Buf: $(buf --version)"
|
|
echo " • Transmission: $(transmission-daemon --version 2>&1 | head -n 1)"
|
|
|
|
# Automatically sync uv workspace if .venv is missing
|
|
if [ ! -d ".venv" ]; then
|
|
echo "Creating virtual environment and syncing workspace..."
|
|
uv sync --all-packages
|
|
fi
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|