Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misunderstanding on page /tutorials/first-steps/reproducible-scripts.html #1096

Open
TNTima opened this issue Jan 17, 2025 · 1 comment
Open

Comments

@TNTima
Copy link

TNTima commented Jan 17, 2025

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash cacert curl jq python3Packages.xmljson
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/2a601aafdc5605a5133a2ca506a34a3a73377247.tar.gz

curl https://github.com/NixOS/nixpkgs/releases.atom | xml2json | jq .

I'm newcomer to nix and I don't understand why nix channel is changed after imports.
Is it okay to post misunderstandings here?

@fricklerhandwerk
Copy link
Collaborator

Hi @TNTima, thanks for asking!

Is it okay to post misunderstandings here?

Yes of course, anything that helps us improve tutorials is highly appreciated.

I don't understand why nix channel is changed after imports.

I'm not sure I got your question right. Do you mean the -I nixpkgs=... part? That one is explained in one of the following paragraphs:

The parameter of -I refers to a specific Git commit of the Nixpkgs repository. This ensures that the script will always run with the exact same packages versions, everywhere.

But maybe I just misunderstood your misunderstanding... :)

fricklerhandwerk added a commit that referenced this issue Jan 17, 2025
Prompted by #1096

It may not be immediately obvious that the paragraphs following the code sample explain the invocation parameters. Making them a list should let that part stand out enough to slow down reading a bit.
fricklerhandwerk added a commit that referenced this issue Jan 19, 2025
…1097)

Prompted by #1096

It may not be immediately obvious that the paragraphs following the code sample explain the invocation parameters. Making them a list should let that part stand out enough to slow down reading a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants