diff --git a/pkgs/by-name/gr/groff/package.nix b/pkgs/by-name/gr/groff/package.nix index bcc71885fd87..fe25d58d66ec 100644 --- a/pkgs/by-name/gr/groff/package.nix +++ b/pkgs/by-name/gr/groff/package.nix @@ -22,7 +22,7 @@ pkg-config, texinfo, bison, - bash, + bashNonInteractive, }: stdenv.mkDerivation rec { @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { buildInputs = [ perl - bash + bashNonInteractive ] ++ lib.optionals enableGhostscript [ ghostscript diff --git a/pkgs/by-name/li/libxo/package.nix b/pkgs/by-name/li/libxo/package.nix index 8e20b8edc7b1..f8747a754e0e 100644 --- a/pkgs/by-name/li/libxo/package.nix +++ b/pkgs/by-name/li/libxo/package.nix @@ -1,7 +1,7 @@ { lib, autoreconfHook, - bash, + bashNonInteractive, libtool, fetchFromGitHub, nix-update-script, @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ autoreconfHook # For patchShebangs in postInstall - bash + bashNonInteractive perl ]; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index d0cb05268d43..917048ca3e94 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -24,7 +24,7 @@ , zlib # platform-specific dependencies -, bash +, bashNonInteractive , darwin , windows @@ -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 '' @@ -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}" @@ -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; diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index d0f937ea038f..9194e93449ed 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -3,7 +3,7 @@ lib, fetchurl, libiconv, - bash, + bashNonInteractive, updateAutotoolsGnuConfigScriptsHook, }: @@ -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) diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index da9b2c9cbcb0..35b34db5a88b 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -5,7 +5,7 @@ fetchurl, perl, libintl, - bash, + bashNonInteractive, updateAutotoolsGnuConfigScriptsHook, gnulib, gawk, @@ -83,7 +83,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; buildInputs = [ - bash + bashNonInteractive libintl ] ++ optionals stdenv.hostPlatform.isSunOS [ diff --git a/pkgs/development/tools/misc/texinfo/packages.nix b/pkgs/development/tools/misc/texinfo/packages.nix index 1c215819a9a2..b0ff25deebcf 100644 --- a/pkgs/development/tools/misc/texinfo/packages.nix +++ b/pkgs/development/tools/misc/texinfo/packages.nix @@ -6,7 +6,7 @@ fetchurl, perl, libintl, - bash, + bashNonInteractive, updateAutotoolsGnuConfigScriptsHook, gnulib, gawk, @@ -57,7 +57,7 @@ let xz libintl libiconv - bash + bashNonInteractive gnulib gawk freebsd diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index ac172d6da111..6d758f27878c 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -6,8 +6,7 @@ , bison , util-linux - # patch for cygwin requires readline support -, interactive ? stdenv.hostPlatform.isCygwin +, interactive ? true , readline , withDocs ? null , forFHSEnv ? false diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index dd5993b36695..dd1035cc3d53 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -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"; @@ -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 @@ -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 ]; @@ -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 @@ -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"; }; @@ -600,7 +600,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check (llvmLibrariesPackages prevStage) { inherit (prevStage) - bash + bashNonInteractive cctools coreutils cpio @@ -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 ( @@ -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 ]; @@ -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 diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix index 8286b5d6076b..c0a6f7e8ea08 100644 --- a/pkgs/stdenv/freebsd/default.nix +++ b/pkgs/stdenv/freebsd/default.nix @@ -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" @@ -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 @@ -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 diff --git a/pkgs/stdenv/generic/common-path.nix b/pkgs/stdenv/generic/common-path.nix index 32c8e278ad27..9eeacd91bcbb 100644 --- a/pkgs/stdenv/generic/common-path.nix +++ b/pkgs/stdenv/generic/common-path.nix @@ -10,7 +10,7 @@ pkgs.gzip pkgs.bzip2.bin pkgs.gnumake - pkgs.bash + pkgs.bashNonInteractive pkgs.patch pkgs.xz.bin diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index bae24800471b..01faee1e6924 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -770,7 +770,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check bzip2 xz zlib - bash + bashNonInteractive binutils coreutils diffutils @@ -806,7 +806,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check gzip bzip2 xz - bash + bashNonInteractive binutils.bintools coreutils diffutils @@ -866,7 +866,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check gzip bzip2 xz - bash + bashNonInteractive coreutils diffutils findutils diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 27f66232b7ad..9923adf3e001 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, cmake, - bash, + bashNonInteractive, gnugrep, fixDarwinDylibNames, file, @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a201065591c..5d964e35e1b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5586,17 +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; - }; - bashInteractiveFHS = callPackage ../shells/bash/5.nix { - interactive = true; + bashInteractive = bash; + bashFHS = callPackage ../shells/bash/5.nix { forFHSEnv = true; }; + bashInteractiveFHS = bashFHS; carapace = callPackage ../shells/carapace { buildGoModule = buildGo123Module;