Skip to content
Merged
Show file tree
Hide file tree
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 pkgs/by-name/gr/groff/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
pkg-config,
texinfo,
bison,
bash,
bashNonInteractive,
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
buildInputs =
[
perl
bash
bashNonInteractive
]
++ lib.optionals enableGhostscript [
ghostscript
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/li/libxo/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
autoreconfHook,
bash,
bashNonInteractive,
libtool,
fetchFromGitHub,
nix-update-script,
Expand Down Expand Up @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
autoreconfHook
# For patchShebangs in postInstall
bash
bashNonInteractive
perl
];

Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/interpreters/python/cpython/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
, zlib

# platform-specific dependencies
, bash
, bashNonInteractive
, darwin
, windows

Expand Down Expand Up @@ -235,7 +235,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {

inherit nativeBuildInputs;
buildInputs = lib.optionals (!stdenv.hostPlatform.isWindows) [
bash # only required for patchShebangs
bashNonInteractive # only required for patchShebangs
] ++ buildInputs;

prePatch = optionalString stdenv.hostPlatform.isDarwin ''
Expand Down Expand Up @@ -329,7 +329,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {

postPatch = optionalString (!stdenv.hostPlatform.isWindows) ''
substituteInPlace Lib/subprocess.py \
--replace-fail "'/bin/sh'" "'${bash}/bin/sh'"
--replace-fail "'/bin/sh'" "'${bashNonInteractive}/bin/sh'"
'' + optionalString mimetypesSupport ''
substituteInPlace Lib/mimetypes.py \
--replace-fail "@mime-types@" "${mailcap}"
Expand Down Expand Up @@ -611,7 +611,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# Ensure we don't have references to build-time packages.
# These typically end up in shebangs.
pythonOnBuildForHost buildPackages.bash
pythonOnBuildForHost buildPackages.bashNonInteractive
];

separateDebugInfo = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gettext/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lib,
fetchurl,
libiconv,
bash,
bashNonInteractive,
updateAutotoolsGnuConfigScriptsHook,
}:

Expand Down Expand Up @@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
];
buildInputs =
lib.optionals (!stdenv.hostPlatform.isMinGW) [
bash
bashNonInteractive
]
++ lib.optionals (!stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isCygwin) [
# HACK, see #10874 (and 14664)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/tools/misc/texinfo/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
fetchurl,
perl,
libintl,
bash,
bashNonInteractive,
updateAutotoolsGnuConfigScriptsHook,
gnulib,
gawk,
Expand Down Expand Up @@ -83,7 +83,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
buildInputs =
[
bash
bashNonInteractive
libintl
]
++ optionals stdenv.hostPlatform.isSunOS [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/tools/misc/texinfo/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
fetchurl,
perl,
libintl,
bash,
bashNonInteractive,
updateAutotoolsGnuConfigScriptsHook,
gnulib,
gawk,
Expand Down Expand Up @@ -57,7 +57,7 @@ let
xz
libintl
libiconv
bash
bashNonInteractive
gnulib
gawk
freebsd
Expand Down
10 changes: 5 additions & 5 deletions pkgs/shells/bash/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
, bison
, util-linux

# patch for cygwin requires readline support
, interactive ? stdenv.hostPlatform.isCygwin
, interactive ? true
, readline
, withDocs ? false
, texinfo
, withDocs ? null
, forFHSEnv ? false

, pkgsStatic
Expand All @@ -22,6 +20,9 @@ let
inherit sha256;
});
in
lib.warnIf (withDocs != null) ''
bash: `.override { withDocs = true; }` is deprecated, the docs are always included.
''
stdenv.mkDerivation rec {
pname = "bash${lib.optionalString interactive "-interactive"}";
version = "5.2${patch_suffix}";
Expand Down Expand Up @@ -101,7 +102,6 @@ stdenv.mkDerivation rec {
# Note: Bison is needed because the patches above modify parse.y.
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook bison ]
++ lib.optional withDocs texinfo
++ lib.optional stdenv.hostPlatform.isDarwin stdenv.cc.bintools;

buildInputs = lib.optional interactive readline;
Expand Down
22 changes: 11 additions & 11 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ let
runtimeShell = prevStage.ccWrapperStdenv.shell;
};

bash = prevStage.bash or bootstrapTools;
bashNonInteractive = prevStage.bashNonInteractive or bootstrapTools;

thisStdenv = import ../generic {
name = "${name}-stdenv-darwin";
Expand All @@ -168,7 +168,7 @@ let
inherit extraNativeBuildInputs;

preHook =
lib.optionalString (!isBuiltByNixpkgsCompiler bash) ''
lib.optionalString (!isBuiltByNixpkgsCompiler bashNonInteractive) ''
# Don't patch #!/interpreter because it leads to retained
# dependencies on the bootstrapTools in the final stdenv.
dontPatchShebangs=1
Expand All @@ -181,9 +181,9 @@ let
export PATH_LOCALE=${prevStage.darwin.locale}/share/locale
'';

shell = bash + "/bin/bash";
shell = bashNonInteractive + "/bin/bash";
initialPath = [
bash
bashNonInteractive
prevStage.file
bootstrapTools
];
Expand Down Expand Up @@ -328,7 +328,7 @@ let
# SDK packages include propagated packages and source release packages built during the bootstrap.
sdkPackages = prevStage: {
inherit (prevStage)
bash
bashNonInteractive
libpng
libxml2
libxo
Expand Down Expand Up @@ -408,7 +408,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
# stage should only access the stage that came before it.
ccWrapperStdenv = self.stdenv;

bash = bootstrapTools // {
bashNonInteractive = bootstrapTools // {
shellPath = "/bin/bash";
};

Expand Down Expand Up @@ -600,7 +600,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
(llvmLibrariesPackages prevStage)
{
inherit (prevStage)
bash
bashNonInteractive
cctools
coreutils
cpio
Expand Down Expand Up @@ -847,14 +847,14 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
inherit (prevStage) ccWrapperStdenv;

# Avoid an infinite recursion due to the SDK’s including ncurses, which depends on bash in its `dev` output.
bash = super.bash.override { stdenv = self.darwin.bootstrapStdenv; };
bashNonInteractive = super.bashNonInteractive.override { stdenv = self.darwin.bootstrapStdenv; };

# Avoid pulling in a full python and its extra dependencies for the llvm/clang builds.
libxml2 = super.libxml2.override { pythonSupport = false; };

# Use Bash from this stage to avoid propagating Bash from a previous stage to the final stdenv.
ncurses = super.ncurses.override {
stdenv = self.darwin.bootstrapStdenv.override { shell = lib.getExe self.bash; };
stdenv = self.darwin.bootstrapStdenv.override { shell = lib.getExe self.bashNonInteractive; };
};

darwin = super.darwin.overrideScope (
Expand Down Expand Up @@ -1162,7 +1162,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
extraAttrs = {
inherit bootstrapTools;
libc = prevStage.darwin.libSystem;
shellPackage = prevStage.bash;
shellPackage = prevStage.bashNonInteractive;
};

disallowedRequisites = [ bootstrapTools.out ];
Expand All @@ -1172,7 +1172,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
with prevStage;
[
apple-sdk
bash
bashNonInteractive
bzip2.bin
bzip2.out
cc.expand-response-params
Expand Down
8 changes: 4 additions & 4 deletions pkgs/stdenv/freebsd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let
expand-response-params = "";
bsdcp = linkBootstrap { paths = [ "bin/bsdcp" ]; };
patchelf = linkBootstrap { paths = [ "bin/patchelf" ]; };
bash = linkBootstrap {
bashNonInteractive = linkBootstrap {
paths = [
"bin/bash"
"bin/sh"
Expand Down Expand Up @@ -376,13 +376,13 @@ let
gawk
diffutils
patch
bash
bashNonInteractive
xz
gzip
bzip2
bsdcp
];
shell = "${prevStage.bash}/bin/bash";
shell = "${prevStage.bashNonInteractive}/bin/bash";
stdenvNoCC = import ../generic {
inherit
config
Expand Down Expand Up @@ -471,7 +471,7 @@ in
# we CAN'T import LLVM because the compiler built here is used to build the final compiler and the final compiler must not be built by the bootstrap compiler
inherit (bootstrapTools)
patchelf
bash
bashNonInteractive
curl
coreutils
diffutils
Expand Down
2 changes: 1 addition & 1 deletion pkgs/stdenv/generic/common-path.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pkgs.gzip
pkgs.bzip2.bin
pkgs.gnumake
pkgs.bash
pkgs.bashNonInteractive
pkgs.patch
pkgs.xz.bin

Expand Down
6 changes: 3 additions & 3 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
bzip2
xz
zlib
bash
bashNonInteractive
binutils
coreutils
diffutils
Expand Down Expand Up @@ -806,7 +806,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
gzip
bzip2
xz
bash
bashNonInteractive
binutils.bintools
coreutils
diffutils
Expand Down Expand Up @@ -866,7 +866,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
gzip
bzip2
xz
bash
bashNonInteractive
coreutils
diffutils
findutils
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/compression/zstd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
stdenv,
fetchFromGitHub,
cmake,
bash,
bashNonInteractive,
gnugrep,
fixDarwinDylibNames,
file,
Expand Down Expand Up @@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = lib.optional stdenv.hostPlatform.isUnix bash;
buildInputs = lib.optional stdenv.hostPlatform.isUnix bashNonInteractive;

patches = [
# This patches makes sure we do not attempt to use the MD5 implementation
Expand Down
17 changes: 8 additions & 9 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5586,19 +5586,18 @@ with pkgs;
### SHELLS

runtimeShell = "${runtimeShellPackage}${runtimeShellPackage.shellPath}";
runtimeShellPackage = bash;
runtimeShellPackage = bashNonInteractive;

bash = lowPrio (callPackage ../shells/bash/5.nix { });
bash = callPackage ../shells/bash/5.nix { };
bashNonInteractive = lowPrio (callPackage ../shells/bash/5.nix {
interactive = false;
});
# WARNING: this attribute is used by nix-shell so it shouldn't be removed/renamed
bashInteractive = callPackage ../shells/bash/5.nix {
interactive = true;
withDocs = true;
};
bashInteractiveFHS = callPackage ../shells/bash/5.nix {
interactive = true;
withDocs = true;
bashInteractive = bash;
bashFHS = callPackage ../shells/bash/5.nix {
forFHSEnv = true;
};
bashInteractiveFHS = bashFHS;

carapace = callPackage ../shells/carapace {
buildGoModule = buildGo123Module;
Expand Down
Loading