diff --git a/templates b/templates index 84db4c7..e25b963 100644 --- a/templates +++ b/templates @@ -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