{ description = "Development flake for the HTMX folkugat web"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; python = pkgs.python311; pythonPackages = pkgs.python311Packages; # custom-python = import ./custom-python.nix { inherit pkgs; }; coreDependencies = with pythonPackages; [ # IDE tools pylsp-mypy isort autopep8 # Development tools pytest setuptools ipython # To compile requirements pip-tools ]; projectDependencies = with pythonPackages; [ # API fastapi python-multipart jinja2 uvicorn # Async aiofiles # Files magic # Auth pyjwt # Search levenshtein ]; pythonEnv = python.withPackages ( ps: projectDependencies ++ coreDependencies ); in { devShells.default = pkgs.mkShell { # nativeBuildInputs = [ pkgs.bashInteractive ]; buildInputs = with pkgs; [ # Python dependencies python pythonEnv basedpyright black # Project dependencies nodePackages_latest.tailwindcss lilypond-with-fonts # Project tools sqlite lazysql opencode # Local https mkcert ]; shellHook = '' export PYTHONPATH=${pythonEnv}/${python.sitePackages}:$PYTHONPATH export PYTHONPATH=$(pwd):$PYTHONPATH ''; }; }); }