Skip to content

Add more build options for dependent executables - #16564

Merged
xokdvium merged 6 commits into
NixOS:masterfrom
philiptaron:more-build-options
Oct 6, 2026
Merged

xokdvium merged 6 commits into
NixOS:masterfrom
philiptaron:more-build-options

Conversation

@philiptaron

Copy link
Copy Markdown
Contributor

Motivation

Continues #16110 by adding more helpers for absolute paths Nix relies on.

Context

I'm looking to build a version of Nix which is self-contained.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@philiptaron
philiptaron requested a review from xokdvium October 5, 2026 22:27
@github-actions github-actions Bot added new-cli Relating to the "nix" command fetching Networking with the outside (non-Nix) world, input locking labels Oct 5, 2026
@philiptaron philiptaron changed the title Add more build options for Add more build options for dependent executables Oct 5, 2026
Comment thread src/libutil/meson.options
Comment thread src/libstore/ssh.cc Outdated
Expose the ssh-program build option from libstore as sshProgram(),
mirroring gitProgram() in libfetchers, so the Git LFS ssh handshake no
longer hardcodes "ssh" from PATH.
The bash-program build option covered nix develop and nix-shell, but
nix shell still fell back to a bare "bash" from PATH.
Nix runs some command strings through a POSIX shell. Examples are the pager and ssh LocalCommand.

Instead of using a hardcoded /bin/sh, make that path configurable at build time and expose it as shProgram(), like gitProgram() and sshProgram().

It has to be absolute because neither execl nor ssh searches PATH for it.
Comment thread src/libmain/shared.cc Outdated
Run $NIX_PAGER/$PAGER through shProgram() instead of a hardcoded /bin/sh.
The local ssh client runs -oLocalCommand through $SHELL, so point it at
shProgram() instead of a hardcoded /bin/sh.

@xokdvium xokdvium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor note. Otherwise let's proceed to unblock you. I don't necessarily feel strongly about this, but being explicit about such implicit dependencies is good regardless IMO.

@xokdvium xokdvium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor note. Otherwise let's proceed to unblock you. I don't necessarily feel strongly about this, but being explicit about such implicit dependencies is good regardless IMO.

@xokdvium
xokdvium enabled auto-merge October 6, 2026 19:40
@philiptaron

Copy link
Copy Markdown
Contributor Author

NixOS/nixpkgs#1424 is what I was thinking of with /bin/sh BTW. Also:

Not planning on fixing these directly, but they're bricks in the wall of /bin/sh coming down.

@xokdvium
xokdvium added this pull request to the merge queue Oct 6, 2026
Merged via the queue into NixOS:master with commit c70c8d3 Oct 6, 2026
16 checks passed
@philiptaron
philiptaron deleted the more-build-options branch October 6, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants