Update pythonshell, remove poetryshell template
This commit is contained in:
parent
4c104e8315
commit
1842b75a75
29
templates
29
templates
|
@ -173,31 +173,16 @@ nix-mode
|
|||
(pythonshell "let" n
|
||||
> "pkgs = import " (p "<nixpkgs>") " {};" 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 "<nixpkgs>") " {};" 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
|
||||
|
|
Loading…
Reference in a new issue