Add shell.nix for easier testing on NixOS

This commit is contained in:
Lukáš Kucharczyk 2024-07-30 13:52:58 +02:00
parent ebff41e016
commit 6e10a30c48
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 21 additions and 0 deletions

21
shell.nix Normal file
View File

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