diff options
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 8 | ||||
-rw-r--r-- | pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 22 |
3 files changed, 19 insertions, 13 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index b5a9f0cc5cb9..b25a840f460e 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -268,6 +268,12 @@ rec { ${bootstrapTools}/bin/codesign > $out/bin/codesign chmod a+x $out/bin/codesign ''; + # on next bootstrap tools update, use the following: + # installPhase = '' + # mkdir -p $out/bin + # ln -s ${bootstrapTools}/bin/sigtool $out/bin + # ln -s ${bootstrapTools}/bin/codesign $out/bin + # ''; }; print-reexports = stdenv.mkDerivation { @@ -452,7 +458,7 @@ rec { libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils - libssh2 nghttp2 libkrb5 ninja brotli; + libssh2 nghttp2 libkrb5 ninja brotli libiconv; "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( let diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index c62e72f6047c..434eadb38bf0 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -206,7 +206,7 @@ in rec { done for i in $out/bin/*; do - if test -x "$i" -a ! -L "$i" -a "$(basename $i)" != codesign; then + if test -x "$i" -a ! -L "$i"; then echo "Adding @executable_path to rpath in $i" ${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i fi diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index f90d9020f89f..fd0535898a8d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1,5 +1,6 @@ set -eu set -o pipefail +shopt -s inherit_errexit if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 4 ]]; then echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})" @@ -409,15 +410,14 @@ findInputs() { # The current package's host and target offset together # provide a <=-preserving homomorphism from the relative # offsets to current offset - local -i mapOffsetResult function mapOffset() { local -r inputOffset="$1" + local -n outputOffset="$2" if (( inputOffset <= 0 )); then - local -r outputOffset=$((inputOffset + hostOffset)) + outputOffset=$((inputOffset + hostOffset)) else - local -r outputOffset=$((inputOffset - 1 + targetOffset)) + outputOffset=$((inputOffset - 1 + targetOffset)) fi - mapOffsetResult="$outputOffset" } # Host offset relative to that of the package whose immediate @@ -429,16 +429,16 @@ findInputs() { # Host offset relative to the package currently being # built---as absolute an offset as will be used. - mapOffset relHostOffset - local -i hostOffsetNext="$mapOffsetResult" + local hostOffsetNext + mapOffset "$relHostOffset" hostOffsetNext # Ensure we're in bounds relative to the package currently # being built. - [[ "${allPlatOffsets[*]}" = *"$hostOffsetNext"* ]] || continue + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue # Target offset relative to the *host* offset of the package # whose immediate dependencies we are currently exploring. - local -i relTargetOffset + local relTargetOffset for relTargetOffset in "${allPlatOffsets[@]}"; do (( "$relHostOffset" <= "$relTargetOffset" )) || continue @@ -448,12 +448,12 @@ findInputs() { # Target offset relative to the package currently being # built. - mapOffset relTargetOffset - local -i targetOffsetNext="$mapOffsetResult" + local targetOffsetNext + mapOffset "$relTargetOffset" targetOffsetNext # Once again, ensure we're in bounds relative to the # package currently being built. - [[ "${allPlatOffsets[*]}" = *"$targetOffsetNext"* ]] || continue + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue [[ -f "$pkg/nix-support/$file" ]] || continue |