-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
43 lines (37 loc) · 975 Bytes
/
Copy pathflake.nix
File metadata and controls
43 lines (37 loc) · 975 Bytes
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
{
description = "drip devshell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
uv
python312
];
shellHook = ''
if [ ! -d ".env" ]; then
source .env
fi
if [ ! -d ".venv" ]; then
uv venv .venv
fi
source .venv/bin/activate
uv sync
echo "drip development environment"
echo ""
echo "Available commands:"
echo " - uv sync # Install dependencies"
echo " - uv run python main.py # Start the server (direct)"
echo " - uv run flask run # Start the server (flask CLI)"
echo ""
'';
};
};
}