From 1842b75a750e78e11958dec18c4b880195a7496b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 10 Jul 2024 06:23:16 +0100 Subject: [PATCH] Update pythonshell, remove poetryshell template --- templates | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/templates b/templates index 97aec9a..685c865 100644 --- a/templates +++ b/templates @@ -171,33 +171,18 @@ nix-mode (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 "let" n - > "pkgs = import " (p "") " {};" n + > "pkgs = import " (p "") " {};" n > "in pkgs.mkShellNoCC {" n - > "packages = [" n - > "(pkgs." (p "python3") ".withPackages" n - > "(ps: with ps; ["(p "mypy") "]))" n + > "packages = with pkgs; [" n + > "poetry" n + > (p "python3") n > q n > "];" n + > "shellHook = ''" n + > "export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib" n + > "'';" n > "}") -(poetryshell "# See https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md#cases" n - "# for edgecases like setuptools not found" n - "let" n - > "pkgs = import " (p "") " {};" n - > "poetry2nix = (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};" n - > "poetryEnv = let " n - > "projectDir = " (p "./.") ";" n - > "in (poetry2nix.mkPoetryEnv {" n - > "inherit projectDir;" n - > "overrides = poetry2nix.defaultPoetryOverrides;" n - > "python = " (p "pkgs.python3") ";" n - > "editablePackageSources = {" (p "package") "= projectDir;};" n - > "extraPackages = (ps: [" q "]);" n - > "preferWheels = true;" n - > "groups = [\"dev\"];" n - > "extras = [\"*\"];" n - > "});" n - "in" n - > "poetryEnv.env") + (poetryoverride "overrides = poetry2nix.defaultPoetryOverrides.extend" n > "(self: super: {" n > (s package) " =" n