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

fix mkShellNoCC to use packages instead of buildInputs #1020

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/tutorials/nix-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@ let
message = "hello world";
in
pkgs.mkShellNoCC {
buildInputs = with pkgs; [ cowsay ];
packages = with pkgs; [ cowsay ];
shellHook = ''
cowsay ${message}
'';
Expand All @@ -1953,7 +1953,7 @@ Explanation:
- The name `message` is bound to the string value `"hello world"`.
- The attribute `mkShellNoCC` of the `pkgs` set is a function that is passed an attribute set as argument.
Its return value is also the result of the outer function.
- The attribute set passed to `mkShellNoCC` has the attributes `buildInputs` (set to a list with one element: the `cowsay` attribute from `pkgs`) and `shellHook` (set to an indented string).
- The attribute set passed to `mkShellNoCC` has the attributes `packages` (set to a list with one element: the `cowsay` attribute from `pkgs`) and `shellHook` (set to an indented string).
- The indented string contains an interpolated expression, which will expand the value of `message` to yield `"hello world"`.


Expand Down
Loading