Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 84765451c2f6
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: c88290789c06
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 15, 2020

  1. doc: Rewrite python onboarding tutorials in manual

    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.
    bhipple authored and FRidh committed May 15, 2020
    Copy the full SHA
    c882907 View commit details
    Browse the repository at this point in the history