User Error (Ignore)

Typically I see/use nix repl as

nix repl -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/aa0e8072a57e879073cee969a780e586dbe57997.tar.gz
Welcome to Nix 2.11.1. Type :? for help.

nix-repl>  pkgs = import <nixpkgs> {}
nix-repl>  pkgs.python3Packages.          # autocomplete to list available

However, with newer commits it seesms flakes, understandibly, take priority

nix repl -I nixpkgs=https://api.github.com/repos/NixOS/nix/tarball/c18456604601dd233be4ad2462474488ef8f87e3
Welcome to Nix 2.11.1. Type :? for help.

nix-repl> n = import <nixpkgs>                   #  note no {}'s
nix-repl> n.outputs.packages.aarch64-darwin.     # (I'm on darwin)

n.outputs.packages.aarch64-darwin.default
n.outputs.packages.aarch64-darwin.nix-gccStdenv
n.outputs.packages.aarch64-darwin.nix                
n.outputs.packages.aarch64-darwin.nix-libcxxStdenv
n.outputs.packages.aarch64-darwin.nix-ccacheStdenv   
n.outputs.packages.aarch64-darwin.nix-stdenv
n.outputs.packages.aarch64-darwin.nix-clang11Stdenv
n.outputs.packages.aarch64-darwin.nix-clangStdenv

# ^ that only looks like buildPackages/bootstrap stuff (e.g. no python3Packages)
# and as far as I can tell
# none of the attributes/sub-attributes of `n` contains `python3Packages`

How do I get to the old python3Packages via the new flake expression?

(And is there a new set of docs I should be reading since what I know is outdated?)

Why did you switch from https://github.com/NixOS/nixpkgs/archive to https://api.github.com/repos/NixOS/nix/tarball? NixOS/nix is not the repo that contains nixpkgs. Its default.nix is a flake-compat one

3 Likes

Try it, the archive format not longer works. (I was suprised as well)

Older Commit (works fine)
https://github.com/NixOS/nixpkgs/archive/aa0e8072a57e879073cee969a780e586dbe57997.tar.gz

Newer Commit Error 404
https://github.com/NixOS/nixpkgs/archive/c18456604601dd233be4ad2462474488ef8f87e3.tar.gz

Because c18456604601dd233be4ad2462474488ef8f87e3 is a commit on the NixOS/nix repo, not the NixOS/nixpkgs repo.

Oh :man_facepalming: thank you, I must’ve screwed that up when updating the URL