Skip to content

Commit

Permalink
bashInteractive: remove CC reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tie committed Aug 26, 2024
1 parent e05e2b1 commit 380f165
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/shells/bash/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, updateAutotoolsGnuConfigScriptsHook
, bison
, util-linux
, removeReferencesTo

# patch for cygwin requires readline support
, interactive ? stdenv.isCygwin
Expand Down Expand Up @@ -100,6 +101,7 @@ stdenv.mkDerivation rec {
# Note: Bison is needed because the patches above modify parse.y.
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook bison ]
++ lib.optional interactive removeReferencesTo
++ lib.optional withDocs texinfo
++ lib.optional stdenv.hostPlatform.isDarwin stdenv.cc.bintools;

Expand All @@ -123,8 +125,8 @@ stdenv.mkDerivation rec {
postFixup =
if interactive
then ''
substituteInPlace "$out/bin/bashbug" \
--replace '#!/bin/sh' "#!$out/bin/bash"
remove-references-to -t "$NIX_CC" -- "$out"/bin/bashbug
HOST_PATH=$out/bin patchShebangs --host -- "$out"/bin/bashbug
''
# most space is taken by locale data
else ''
Expand Down

0 comments on commit 380f165

Please sign in to comment.