diff --git a/flake.nix b/flake.nix index 91f3859..45ea78c 100644 --- a/flake.nix +++ b/flake.nix @@ -14,14 +14,15 @@ # Define Python version and packages pythonVersion = "python311"; # You can change this to python310, python312, etc. + pythonEnv = pkgs.${pythonVersion}; # Get the specific Python environment + pythonPackages = ps: with ps; [ # Core Python - pkgs.${pythonVersion} + #pkgs.${pythonVersion} - # Common development tools - pip - setuptools - wheel + pythonEnv.pkgs.pip + pythonEnv.pkgs.setuptools + pythonEnv.pkgs.wheel # Example useful packages (uncomment and add as needed) # black # Code formatter @@ -41,17 +42,7 @@ # Environment variables you might want to set shellHook = '' echo "Welcome to the Python development shell!" - export PATH="$HOME/.local/bin:$PATH" # Example: if you install packages globally via pip (not recommended with Nix) - # If you are using a specific Python version managed by Nix, you might - # want to ensure it's in your PATH. The above `packages` should handle this. - - # You can also set up virtual environments here if you prefer, - # although Nix aims to manage dependencies directly. - # Example: using venvwrapper if installed - # if [ -f "$(command -v venvwrapper.sh)" ]; then - # export WORKON_HOME=$HOME/.virtualenvs - # source $(command -v venvwrapper.sh) - # fi + export NIX_PROJECT_SHELL="SPARC" ''; }; }