Add poetryoverride template, add link to edgecases to poetryshell
This commit is contained in:
parent
e1c8c477ff
commit
edd11a6c34
14
templates
14
templates
|
@ -184,16 +184,26 @@ nix-mode
|
|||
n> q
|
||||
n> "];"
|
||||
n> "}")
|
||||
(poetryshell "with import " (p "<nixpkgs>") " {};"
|
||||
(poetryshell "# See https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md#cases"
|
||||
n "# for edgecases like setuptools not found"
|
||||
n "with import " (p "<nixpkgs>") " {};"
|
||||
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 "python-lsp-server isort mypy")"];"
|
||||
n> "extraPackages = ps: with ps; [" (p "python-lsp-server isort mypy") " " q "];"
|
||||
n> "})"
|
||||
n> ".env")
|
||||
(poetryoverride "overrides = defaultPoetryOverrides.extend"
|
||||
n> "(self: super: {"
|
||||
n> (s package) " ="
|
||||
n> "super." package ".overridePythonAttrs"
|
||||
n> "(old: {"
|
||||
n> "buildInputs = (old.buildInputs or []) ++ [super." (p "setuptools" ) "];"
|
||||
n> "});"
|
||||
n> "});")
|
||||
|
||||
python-base-mode
|
||||
|
||||
|
|
Loading…
Reference in a new issue