Development Shell
This commit is contained in:
commit
271017e89f
2 changed files with 30 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.venv/
|
||||||
29
flake.nix
Normal file
29
flake.nix
Normal 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue