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."
(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
(poetryshell "let"
n> "pkgs = import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};"
n> "poetry2nix = (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};"
n> "in"
n> "pkgs.mkShellNoCC {"
n> "packages = [" (p "pkgs.poetry poetry2nix.mkPoetryEnv {projectDir = ./.; preferWheels = true;}") "];"
n> "}")
(poetrypackage "") ; TODO
(pythonshell "with import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};"
n> "with python3Packages;"
n> "mkShellNoCC {"
n> "packages = [" (p) "];"
n> "};")
(poetryshell "with import (builtins.getFlake \"github:nixos/nixpkgs" (p "/23.11")"\") {};"
n "with (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};"
n> "(mkPoetryEnv rec {"
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