Add nix shell config

This commit is contained in:
Yan Lin 2025-05-15 22:46:36 +02:00
parent f747f57145
commit ac07362535
5 changed files with 120 additions and 47 deletions

17
shell.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
packages = with pkgs; [
python312
python312Packages.pip
python312Packages.virtualenv
];
shellHook = ''
if [ ! -d .venv ]; then
python -m venv .venv
fi
source .venv/bin/activate
pip install -r requirements.txt
'';
}