Python: Difference between revisions
→Using micromamba: Now the Micromamba target prefix as example won't be recreated every time. And in the case that it is, there won't be a prompt. |
Asymmetric (talk | contribs) →Python environments with Nix: add poetry shell.nix example |
||
| Line 107: | Line 107: | ||
Next time you enter the shell specified by this file, Nix will build and include the Python package you have written. | Next time you enter the shell specified by this file, Nix will build and include the Python package you have written. | ||
=== Using poetry === | |||
<syntaxhighlight lang="nix"> | |||
# shell.nix | |||
let | |||
pkgs = import <nixpkgs> {}; | |||
in pkgs.mkShell { | |||
packages = with pkgs; [ | |||
python310 | |||
(poetry.override { python = python310; }) | |||
]; | |||
} | |||
</syntaxhighlight> | |||
=== Using micromamba === | === Using micromamba === | ||