bash: Make interactive by default#379368
Merged
K900 merged 2 commits intoNixOS:stagingfrom Feb 9, 2025
Merged
Conversation
13 tasks
bryanhonof
approved these changes
Feb 4, 2025
Bash is distributing the rendered docs with the source, so no build tools are used or needed anymore. This was not the case originally, see dd91141
The status quo of `bash` not being interactive is frustrating for many users, because trying to use it interactively is just messed up, and `bashInteractive` is not intuitive and barely discoverable. This was brought to my (and many others) attention by @stahnma in his [talk at CfgMgmtCamp 2025](https://cfp.cfgmgmtcamp.org/ghent2025/talk/YUVUTN/), where he highlighted this as one of the frustrations he ran into when learning Nix. Why this is fine: - No reason for not making interactive the default was given in the original commit (6c6ff6f), but probably it was due to the increase in closure size - The closure size only increases by 6.9MiB (19.5%) today, with the added dependency on the store paths for readline and ncurses, which are needed on systems in almost all cases anyways - If somebody really needs to get a more minimal system, they can use the newly-introduced `bashNonInteractive` instead now - Though to apply it consistently, they'll need to do that in an overlay like ``` final: prev: { bash = self.bashNonInteractive; } ``` Or alternatively using the `system.replaceDependencies.replacements` NixOS option approach. While there's also other such `*Interactive` packages that could use the same treatment, `bash` is a great start. This was already attempted before in NixOS#151227, but was not continued for unknown reason. To avoid stdenv becoming bigger, all uses of bash in the (working) stdenv's are changed to the explicitly non-interactive version here. This commit will however still cause a mass rebuild for all packages (and reverse deps) making use of the default bash.
34a4d45 to
e3491c9
Compare
13 tasks
13 tasks
vcunat
pushed a commit
that referenced
this pull request
Feb 18, 2025
13 tasks
6 tasks
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
13 tasks
13 tasks
13 tasks
jhol
added a commit
to jhol/nixpkgs
that referenced
this pull request
Oct 21, 2025
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 8, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 9, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 10, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 11, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 12, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 13, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
vdemeester
pushed a commit
to vdemeester/nixpkgs
that referenced
this pull request
Jan 14, 2026
bash has been interactive by default since this PR [1] was merged. This commit simplifies dockerTools given that there is now no distinction between bash and bashInteractive. * [1] NixOS#379368 Co-authored-by: commiterate <[email protected]> Signed-off-by: Joel Holdsworth <[email protected]>
thunze
added a commit
to thunze/reproducible-inference
that referenced
this pull request
Feb 16, 2026
bash is interactive by default since NixOS/nixpkgs#379368.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a continuation of @Artturin's #151227, which I only saw after I was done with this one 😅
The status quo of
bashnot being interactive is frustrating for many users, because trying to use it interactively is just messed up, andbashInteractiveis not intuitive and barely discoverable.This was brought to my (and many others) attention by @stahnma in his talk at CfgMgmtCamp 2025, where he highlighted this as one of the frustrations he ran into when learning Nix.
Why this is fine to change:
No reason for not making interactive the default was given in the original commit (6c6ff6f), but probably it was due to the increase in closure size
The closure size only increases by 6.9MiB (19.5%) today, with the added dependency on the store paths for readline and ncurses, which are needed on systems in almost all cases anyways. Even
systemd-minimalincludes themIf somebody really needs to get a more minimal system without those paths, they can use the newly-introduced
bashNonInteractiveinstead nowThough to apply it consistently, they'll need to do that in an overlay like
Or alternatively using the
system.replaceDependencies.replacementsNixOS option approach.While there's also other such
*Interactivepackages that could use the same treatment,bashis a great start.This was already attempted before in #151227, but was not continued for unknown reason.
To avoid stdenv becoming bigger, all uses of bash in the (working) stdenv's are changed to the explicitly non-interactive version here.
This commit will however still cause a mass rebuild for all packages (and reverse deps) making use of the default bash.
In addition to this main change I've also done a minor bash cleanup in the first commit.
Closes #151227
Things done
stdenv's don't change (linux, darwin, freebsd, cross)This work is funded by Tweag and Antithesis ✨
Add a 👍 reaction to pull requests you find important.