hafas-fumbling/flake.nix
2026-03-23 09:58:05 +01:00

29 lines
633 B
Nix

{
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
'';
};
};
}