diff options
Diffstat (limited to 'pkgs/shells/bash/5.nix')
-rw-r--r-- | pkgs/shells/bash/5.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index 6b126390c9f..3c4fb83e3e4 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -2,7 +2,6 @@ , stdenv , buildPackages , fetchurl -, binutils , bison , util-linux @@ -68,6 +67,12 @@ stdenv.mkDerivation rec { ]; configureFlags = [ + # At least on Linux bash memory allocator has pathological performance + # in scenarios involving use of larger memory: + # https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00052.html + # Various distributions default to system allocator. Let's nixpkgs + # do the same. + "--without-bash-malloc" (if interactive then "--with-installed-readline" else "--disable-readline") ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "bash_cv_job_control_missing=nomissing" @@ -81,7 +86,6 @@ stdenv.mkDerivation rec { "bash_cv_dev_fd=standard" "bash_cv_termcap_lib=libncurses" ] ++ lib.optionals (stdenv.hostPlatform.libc == "musl") [ - "--without-bash-malloc" "--disable-nls" ]; @@ -90,7 +94,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison ] ++ lib.optional withDocs texinfo - ++ lib.optional stdenv.hostPlatform.isDarwin binutils; + ++ lib.optional stdenv.hostPlatform.isDarwin stdenv.cc.bintools; buildInputs = lib.optional interactive readline; |