Update poetryshell template, add (initial) pythonshell template

This commit is contained in:
Evie Litherland-Smith 2024-03-24 12:03:04 +00:00
parent 7dd0e0f4ed
commit f84d21d67e

View file

@ -176,15 +176,21 @@ nix-mode
"platforms = platforms." "platforms = platforms."
(p (completing-read "Platform: " '("all" "allBut" "arm" "cygwin" "darwin" "freebsd" "gnu" "i686" "illumos" "linux" "mesaPlatforms" "mips" "netbsd" "none" "openbsd" "unix" "x86"))) ";" n> q "};" n> "}" (p (completing-read "Platform: " '("all" "allBut" "arm" "cygwin" "darwin" "freebsd" "gnu" "i686" "illumos" "linux" "mesaPlatforms" "mips" "netbsd" "none" "openbsd" "unix" "x86"))) ";" n> q "};" n> "}"
) )
(pythonshell "") ; TODO (pythonshell "with import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};"
(poetryshell "let" n> "with python3Packages;"
n> "pkgs = import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};" n> "mkShellNoCC {"
n> "poetry2nix = (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};" n> "packages = [" (p) "];"
n> "in" n> "};")
n> "pkgs.mkShellNoCC {" (poetryshell "with import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};"
n> "packages = [" (p "pkgs.poetry poetry2nix.mkPoetryEnv {projectDir = ./.; preferWheels = true;}") "];" n "with (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};"
n> "}") n> "(mkPoetryEnv rec {"
(poetrypackage "") ; TODO n> "projectDir = ./.;"
n> "preferWheels = true;"
n> "extras = [\"*\"];"
n> "editablePackageSources = {" (p "package") "=projectDir;};"
n> "extraPackages = ps: with ps; [" (p "isort mypy")"];"
n> "})"
n> ".env")
python-base-mode python-base-mode