-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
43 lines (36 loc) · 1.13 KB
/
Copy pathshell.nix
File metadata and controls
43 lines (36 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
packages = with pkgs; [
gnumake
python313
python313.pkgs.pip
nodejs_22
pnpm
ollama
];
shellHook = ''
export MAIN_ENDPOINT="''${MAIN_ENDPOINT:-http://127.0.0.1:8000}"
if [ ! -d backend/.venv ]; then
echo "Setting up backend virtualenv..."
python3 -m venv backend/.venv
fi
source backend/.venv/bin/activate
if [ ! -f backend/.venv/.forge-deps ]; then
echo "Installing backend dependencies..."
pip install --upgrade pip
pip install -r backend/requirements.txt -r backend/requirements-dev.txt
touch backend/.venv/.forge-deps
fi
if [ ! -d frontend/node_modules ]; then
echo "Installing frontend dependencies..."
(cd frontend && pnpm install)
fi
[ -f backend/.env ] || cp backend/app/.env.example backend/.env
[ -f frontend/.env.local ] || cp frontend/.env.local.example frontend/.env.local
echo ""
echo "Forge shell ready."
echo " make run # backend + CLI together"
echo " make backend # API only on 127.0.0.1:8000"
echo " make frontend # CLI only"
'';
}