mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 09:31:01 +00:00
c88290789c
Based on some feedback in #87094 and discussion with @fridh, this re-organizes the onboarding tutorial in the Nixpkgs manual's python section, so that we start with the simplest, most ad-hoc examples and work our way up. This progresses from: 1. How to create an temporary python env at the cmdline, then 2. How to create a specific python env for a single script, then 3. How to create a specific python env for a project in a shell.nix, then 4. How to install a specific python env globally on the system or in a user profile. Additionally, I've tried to standardize on some of the "best practice" ways of doing things: 1. Instead of saying that this command style is "supported but strongly not discouraged", I've just deleted it to avoid confusion. Bad: nix-shell -p python38Packages.numpy python38Packages.toolz Good: nix-shell -p 'python38.withPackages(ps: with ps; [ numpy toolz ])' 2. In the portion where we show how to add stuff to the user's `XDG_CONFIG_HOME`, use overlays instead of `config.nix`. The former can do everything the latter can do, but is also much more generic and powerful, because it can compose with other files, compose with other envs, compose with overlays that do things like swap whether tensorflow and pytorch are built openblas/mkl/cuda stacks, and so on. The user is eventually going to see the overlay, so to avoid confusion let's standardize on it. |
||
---|---|---|
.. | ||
agda.section.md | ||
android.section.md | ||
beam.xml | ||
bower.xml | ||
coq.xml | ||
crystal.section.md | ||
dotnet.section.md | ||
emscripten.section.md | ||
gnome.xml | ||
go.xml | ||
haskell.section.md | ||
idris.section.md | ||
index.xml | ||
ios.section.md | ||
java.xml | ||
lua.xml | ||
node.section.md | ||
ocaml.xml | ||
perl.xml | ||
php.section.md | ||
python.section.md | ||
qt.xml | ||
r.section.md | ||
ruby.section.md | ||
ruby.xml | ||
rust.section.md | ||
texlive.xml | ||
titanium.section.md | ||
vim.section.md |