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

doc/hacking: note a cause of ./configure failing under zsh #8455

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 6 additions & 0 deletions doc/manual/src/contributing/hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ To build Nix itself in this shell:
[nix-shell]$ make -j $NIX_BUILD_CORES
```

> **Note**
>
> If using zsh and `./configure` is failing, use `${=configureFlags}` in place
> of `$configureFlags` so the configure flags are expanded to multiple words as
> they are in `sh` compatible shells.
Comment on lines +52 to +53
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#8455 (comment) Then the wording is misleading here. It reads to me as "using this syntax is the sh compatible way of expanding space-delimited strings into lists".

The entire premise may be off here. nix develop does some magic to hook you into the builder executable that happens to be bash. Assuming the user essentially does

nix develop
[nix-shell]$ zsh

is too much for this manual to take care of. It would be in the user's responsibility to know how to pass around environment variables in their shell of choice. This type of hack is nixos.wiki material in my opinion, which is essentially a large dump of such hacks (with a few exceptions that should become upstream documentation). Please point out if I'm completely mistaken here. Otherwise I suggest closing this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of direnv does not seem that unreasonable of a use case and I learned about this particularity of word expansion the day I filed this PR after using zsh as my main shell for five years. It's not a terribly obvious thing. But I understand your view as well.


To install it in `$(pwd)/outputs` and test it:

```console
Expand Down