Development Shell

This commit is contained in:
mia 2026-03-23 09:58:05 +01:00
commit 271017e89f
2 changed files with 30 additions and 0 deletions

29
flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "Python env for HaFaS-Fumbling";
inputs.nixpkgs.url = github:nixos/nixpkgs;
outputs = { self, nixpkgs, ... }: let
pipPackages = ''
pyhafas
'';
system = "x86_64-linux";
in {
devShells."${system}".default = let
pkgs = import nixpkgs { inherit system; };
in pkgs.mkShell {
buildInputs = [
pkgs.python312
pkgs.python312Packages.pip
];
shellHook = ''
if [ ! -d ".venv" ]; then
python -m venv .venv
fi
source .venv/bin/activate
pip install ${pipPackages}
exec zsh || true
'';
};
};
}