Merge pull request #210993 from Artturin/cleanupstdenvsetup1

authored by

Artturi and committed by
GitHub
e09153da 5a504755

+73 -135
+1 -1
pkgs/applications/networking/browsers/firefox/common.nix
··· 524 524 fi 525 525 526 526 # Extract the debug info. 527 - header "separating debug info from $i (build ID $id)" 527 + echo "separating debug info from $i (build ID $id)" 528 528 mkdir -p "$dst/''${id:0:2}" 529 529 $OBJCOPY --only-keep-debug "$i" "$dst/''${id:0:2}/''${id:2}.debug" 530 530
+1 -3
pkgs/build-support/fetchbzr/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source "$stdenv/setup" 3 3 4 - header "exporting \`$url' (revision $rev) into \`$out'" 4 + echo "exporting \`$url' (revision $rev) into \`$out'" 5 5 6 6 # Perform a lightweight checkout so that we don't end up importing 7 7 # all the repository's history. 8 8 BZR_LOG=/dev/null bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url" 9 - 10 - stopNest
-2
pkgs/build-support/fetchcvs/builder.sh
··· 24 24 fi 25 25 (cd export && cvs -f -z0 -d "$cvsRoot" export $tag "$module") 26 26 mv export/* $out 27 - 28 - stopNest
+1 -3
pkgs/build-support/fetchdarcs/builder.sh
··· 11 11 tagflags="--context=$context" 12 12 fi 13 13 14 - header "getting $url $partial ${tagtext} into $out" 14 + echo "getting $url $partial ${tagtext} into $out" 15 15 16 16 darcs get --lazy $tagflags "$url" "$out" 17 17 # remove metadata, because it can change 18 18 rm -rf "$out/_darcs" 19 - 20 - stopNest
+1 -2
pkgs/build-support/fetchdocker/fetchdocker-builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source "${stdenv}/setup" 3 - header "exporting ${repository}/${imageName} (tag: ${tag}) into ${out}" 3 + echo "exporting ${repository}/${imageName} (tag: ${tag}) into ${out}" 4 4 mkdir -p "${out}" 5 5 6 6 cat <<EOF > "${out}/compositeImage.sh" ··· 26 26 -c "${manifest}" "${repositories}" -T "${imageFileStorePaths}" 27 27 EOF 28 28 chmod +x "${out}/compositeImage.sh" 29 - stopNest
+2 -4
pkgs/build-support/fetchdocker/generic-fetcher.nix
··· 36 36 inherit name; 37 37 builder = writeText "${fetcher}-builder.sh" '' 38 38 source "$stdenv/setup" 39 - header "${fetcher} exporting to $out" 39 + echo "${fetcher} exporting to $out" 40 40 41 41 declare -A creds 42 42 ··· 49 49 fi 50 50 51 51 if [ -f "$dockerCredentialsFile" ]; then 52 - header "using credentials from $dockerCredentialsFile" 52 + echo "using credentials from $dockerCredentialsFile" 53 53 54 54 CREDSFILE=$(cat "$dockerCredentialsFile") 55 55 creds[token]=$(${awk} -F'=' '/DOCKER_TOKEN/ {print $2}' <<< "$CREDSFILE" | head -n1) ··· 77 77 ${layerDigestFlag} \ 78 78 "${repository}/${imageName}" \ 79 79 "${tag}" 80 - 81 - stopNest 82 80 ''; 83 81 84 82 buildInputs = [ haskellPackages.hocker ];
+1 -1
pkgs/build-support/fetchfirefoxaddon/default.nix
··· 29 29 builder = writeScript "xpibuilder" '' 30 30 source $stdenv/setup 31 31 32 - header "firefox addon $name into $out" 32 + echo "firefox addon $name into $out" 33 33 34 34 UUID="${extid}" 35 35 mkdir -p "$out/$UUID"
+1 -3
pkgs/build-support/fetchfossil/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 - header "Cloning Fossil $url [$rev] into $out" 3 + echo "Cloning Fossil $url [$rev] into $out" 4 4 5 5 # Fossil, bless its adorable little heart, wants to write global configuration 6 6 # to $HOME/.fossil. AFAICT, there is no way to disable this functionality. ··· 19 19 20 20 # Just nuke the checkout file. 21 21 rm $out/.fslckout 22 - 23 - stopNest
+1 -2
pkgs/build-support/fetchgit/builder.sh
··· 6 6 if [ -e .attrs.sh ]; then source .attrs.sh; fi 7 7 source $stdenv/setup 8 8 9 - header "exporting $url (rev $rev) into $out" 9 + echo "exporting $url (rev $rev) into $out" 10 10 11 11 $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \ 12 12 ${leaveDotGit:+--leave-dotGit} \ ··· 18 18 ${branchName:+--branch-name "$branchName"} 19 19 20 20 runHook postFetch 21 - stopNest
+1 -3
pkgs/build-support/fetchhg/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 - header "getting $url${rev:+ ($rev)} into $out" 3 + echo "getting $url${rev:+ ($rev)} into $out" 4 4 5 5 hg clone --insecure "$url" hg-clone 6 6 7 7 hg archive -q$subrepoClause -y ${rev:+-r "$rev"} --cwd hg-clone $out 8 8 rm -f $out/.hg_archival.txt 9 - 10 - stopNest
+3 -9
pkgs/build-support/fetchmtn/builder.sh
··· 8 8 mtn --db "$cacheDB" db init 9 9 fi 10 10 11 - header "getting revision $selector"; 11 + echo "getting revision $selector"; 12 12 13 13 done=; 14 14 for source in $dbs; do ··· 32 32 fi; 33 33 done; 34 34 35 - stopNest; 36 - 37 - header "checking out the revision $revision"; 35 + echo "checking out the revision $revision"; 38 36 39 37 if test -n "$done"; then 40 38 mtn checkout --db "$cacheDB" -r "$revision" "$out" -b "${branch}" ··· 43 41 exit 1; 44 42 fi; 45 43 46 - stopNest 47 - 48 - header "clearing _MTN in the output" 44 + echo "clearing _MTN in the output" 49 45 50 46 rm -rf "$out/_MTN" 51 - 52 - stopNest
+1 -3
pkgs/build-support/fetchsvn/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 3 4 - header "exporting $url (r$rev) into $out" 4 + echo "exporting $url (r$rev) into $out" 5 5 6 6 if test -n "$http_proxy"; then 7 7 # Configure proxy ··· 22 22 svn export --trust-server-cert --non-interactive \ 23 23 ${ignoreExternals:+--ignore-externals} ${ignoreKeywords:+--ignore-keywords} \ 24 24 -r "$rev" "$url" "$out" 25 - 26 - stopNest
+1 -3
pkgs/build-support/fetchsvnssh/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 3 4 - header "exporting $url (r$rev) into $out" 4 + echo "exporting $url (r$rev) into $out" 5 5 6 6 if test "$sshSupport"; then 7 7 export SVN_SSH="$openssh/bin/ssh" ··· 12 12 # whether the server is being spoofed --- only the cryptographic 13 13 # hash of the output matters. 14 14 expect -f $sshSubversion "$username" "$password" "$rev" "$url" $out 15 - 16 - stopNest
+1 -1
pkgs/build-support/fetchurl/builder.sh
··· 37 37 tryDownload() { 38 38 local url="$1" 39 39 echo 40 - header "trying $url" 40 + echo "trying $url" 41 41 local curlexit=18; 42 42 43 43 success=
+2 -4
pkgs/build-support/release/debian-build.nix
··· 43 43 [ ! -f /etc/lsb-release ] || (source /etc/lsb-release; echo "OS release: $DISTRIB_DESCRIPTION") 44 44 echo "System/kernel: $(uname -a)" 45 45 if test -e /etc/debian_version; then echo "Debian release: $(cat /etc/debian_version)"; fi 46 - header "installed Debian packages" 46 + echo "installed Debian packages" 47 47 dpkg-query --list 48 - stopNest 49 48 ''; 50 49 51 50 installPhase = '' ··· 73 72 [ "$(echo $out/debs/*.deb)" != "" ] 74 73 75 74 for i in $out/debs/*.deb; do 76 - header "Generated DEB package: $i" 75 + echo "Generated DEB package: $i" 77 76 dpkg-deb --info "$i" 78 77 pkgName=$(dpkg-deb -W "$i" | awk '{print $1}') 79 78 echo "file deb $i" >> $out/nix-support/hydra-build-products 80 - stopNest 81 79 done 82 80 dpkg -i $out/debs/*.deb 83 81
+1 -2
pkgs/build-support/release/nix-build.nix
··· 74 74 if test -n "$succeedOnFailure"; then 75 75 if test -n "$keepBuildDirectory"; then 76 76 KEEPBUILDDIR="$out/`basename $TMPDIR`" 77 - header "Copying build directory to $KEEPBUILDDIR" 77 + echo "Copying build directory to $KEEPBUILDDIR" 78 78 mkdir -p $KEEPBUILDDIR 79 79 cp -R "$TMPDIR/"* $KEEPBUILDDIR 80 - stopNest 81 80 fi 82 81 fi 83 82 '';
+1 -2
pkgs/build-support/release/source-tarball.nix
··· 64 64 if test -n "$succeedOnFailure"; then 65 65 if test -n "$keepBuildDirectory"; then 66 66 KEEPBUILDDIR="$out/`basename $TMPDIR`" 67 - header "Copying build directory to $KEEPBUILDDIR" 67 + echo "Copying build directory to $KEEPBUILDDIR" 68 68 mkdir -p $KEEPBUILDDIR 69 69 cp -R "$TMPDIR/"* $KEEPBUILDDIR 70 - stopNest 71 70 fi 72 71 fi 73 72 '';
+1 -3
pkgs/build-support/setup-hooks/audit-tmpdir.sh
··· 13 13 local dir="$1" 14 14 [ -e "$dir" ] || return 0 15 15 16 - header "checking for references to $TMPDIR/ in $dir..." 16 + echo "checking for references to $TMPDIR/ in $dir..." 17 17 18 18 local i 19 19 find "$dir" -type f -print0 | while IFS= read -r -d $'\0' i; do ··· 36 36 fi 37 37 38 38 done 39 - 40 - stopNest 41 39 }
+1 -2
pkgs/build-support/setup-hooks/canonicalize-jars.sh
··· 6 6 7 7 canonicalizeJarsIn() { 8 8 local dir="$1" 9 - header "canonicalizing jars in $dir" 9 + echo "canonicalizing jars in $dir" 10 10 dir="$(realpath -sm -- "$dir")" 11 11 while IFS= read -rd '' f; do 12 12 canonicalizeJar "$f" 13 13 done < <(find -- "$dir" -type f -name '*.jar' -print0) 14 - stopNest 15 14 } 16 15 17 16 source @canonicalize_jar@
-2
pkgs/build-support/setup-hooks/patch-shebangs.sh
··· 100 100 fi 101 101 fi 102 102 done < <(find "$@" -type f -perm -0100 -print0) 103 - 104 - stopNest 105 103 } 106 104 107 105 patchShebangsAuto () {
+4 -4
pkgs/build-support/setup-hooks/postgresql-test-hook/postgresql-test-hook.sh
··· 53 53 echo >&2 'initdb not found. Did you add postgresql to the checkInputs?' 54 54 false 55 55 fi 56 - header 'initializing postgresql' 56 + echo 'initializing postgresql' 57 57 initdb -U postgres 58 58 59 59 # Move the socket ··· 65 65 echo "listen_addresses = ''" >>"$PGDATA/postgresql.conf" 66 66 fi 67 67 68 - header 'starting postgresql' 68 + echo 'starting postgresql' 69 69 eval "${postgresqlStartCommands:-pg_ctl start}" 70 70 71 - header 'setting up postgresql' 71 + echo 'setting up postgresql' 72 72 eval "$postgresqlTestSetupCommands" 73 73 74 74 } 75 75 76 76 postgresqlStop() { 77 - header 'stopping postgresql' 77 + echo 'stopping postgresql' 78 78 pg_ctl stop 79 79 }
+1 -1
pkgs/build-support/setup-hooks/separate-debug-info.sh
··· 26 26 fi 27 27 28 28 # Extract the debug info. 29 - header "separating debug info from $i (build ID $id)" 29 + echo "separating debug info from $i (build ID $id)" 30 30 mkdir -p "$dst/${id:0:2}" 31 31 32 32 # This may fail, e.g. if the binary is for a different
+2 -4
pkgs/build-support/vm/default.nix
··· 527 527 echo "System/kernel: $(uname -a)" 528 528 if test -e /etc/fedora-release; then echo "Fedora release: $(cat /etc/fedora-release)"; fi 529 529 if test -e /etc/SuSE-release; then echo "SUSE release: $(cat /etc/SuSE-release)"; fi 530 - header "installed RPM packages" 530 + echo "installed RPM packages" 531 531 rpm -qa --qf "%{Name}-%{Version}-%{Release} (%{Arch}; %{Distribution}; %{Vendor})\n" 532 - stopNest 533 532 ''; 534 533 535 534 buildPhase = '' ··· 559 558 find $rpmout -name "*.rpm" -exec cp {} $out/$outDir \; 560 559 561 560 for i in $out/$outDir/*.rpm; do 562 - header "Generated RPM/SRPM: $i" 561 + echo "Generated RPM/SRPM: $i" 563 562 rpm -qip $i 564 - stopNest 565 563 done 566 564 567 565 eval "$postInstall"
+1 -3
pkgs/development/compilers/chicken/4/fetchegg/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 3 4 - header "exporting egg ${eggName} (version $version) into $out" 4 + echo "exporting egg ${eggName} (version $version) into $out" 5 5 6 6 mkdir -p $out 7 7 chicken-install -r "${eggName}:${version}" 8 8 cp -r ${eggName}/* $out/ 9 - 10 - stopNest
+1 -3
pkgs/development/compilers/chicken/5/fetchegg/builder.sh
··· 1 1 if [ -e .attrs.sh ]; then source .attrs.sh; fi 2 2 source $stdenv/setup 3 3 4 - header "exporting egg ${eggName} (version $version) into $out" 4 + echo "exporting egg ${eggName} (version $version) into $out" 5 5 6 6 mkdir -p $out 7 7 CHICKEN_EGG_CACHE=. chicken-install -r "${eggName}:${version}" 8 8 rm ${eggName}/{STATUS,TIMESTAMP} 9 9 cp -r ${eggName}/* $out/ 10 - 11 - stopNest
-3
pkgs/development/tools/misc/automake/automake-1.11.x.nix
··· 22 22 nativeBuildInputs = [ perl autoconf ]; 23 23 buildInputs = [ autoconf ]; 24 24 25 - # Disable indented log output from Make, otherwise "make.test" will 26 - # fail. 27 - preCheck = "unset NIX_INDENT_MAKE"; 28 25 doCheck = false; # takes _a lot_ of time, fails 11 of 782 tests 29 26 30 27 # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
-3
pkgs/development/tools/misc/automake/automake-1.15.x.nix
··· 16 16 17 17 patches = [ ./help2man-SOURCE_DATE_EPOCH-support.patch ]; 18 18 19 - # Disable indented log output from Make, otherwise "make.test" will 20 - # fail. 21 - preCheck = "unset NIX_INDENT_MAKE"; 22 19 doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths 23 20 doInstallCheck = false; # runs the same thing, fails the same tests 24 21
-3
pkgs/development/tools/misc/automake/automake-1.16.x.nix
··· 15 15 16 16 setupHook = ./setup-hook.sh; 17 17 18 - # Disable indented log output from Make, otherwise "make.test" will 19 - # fail. 20 - preCheck = "unset NIX_INDENT_MAKE"; 21 18 doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths 22 19 doInstallCheck = false; # runs the same thing, fails the same tests 23 20
+1 -3
pkgs/development/tools/misc/patchelf/setup-hook.sh
··· 8 8 local dir="$1" 9 9 [ -e "$dir" ] || return 0 10 10 11 - header "shrinking RPATHs of ELF executables and libraries in $dir" 11 + echo "shrinking RPATHs of ELF executables and libraries in $dir" 12 12 13 13 local i 14 14 while IFS= read -r -d $'\0' i; do ··· 17 17 echo "shrinking $i" 18 18 patchelf --shrink-rpath "$i" || true 19 19 done < <(find "$dir" -type f -print0) 20 - 21 - stopNest 22 20 }
+2 -2
pkgs/os-specific/linux/sgx/psw/default.nix
··· 132 132 # NixOS module which is based on those files without relying on them. Still, it 133 133 # is helpful to have properly patched versions for non-NixOS distributions. 134 134 postFixup = '' 135 - header "Fixing aesmd.service" 135 + echo "Fixing aesmd.service" 136 136 substituteInPlace $out/lib/systemd/system/aesmd.service \ 137 137 --replace '@aesm_folder@' \ 138 138 "$out/aesm" \ ··· 149 149 --replace "/bin/kill" \ 150 150 "${coreutils}/bin/kill" 151 151 152 - header "Fixing remount-dev-exec.service" 152 + echo "Fixing remount-dev-exec.service" 153 153 substituteInPlace $out/lib/systemd/system/remount-dev-exec.service \ 154 154 --replace '/bin/mount' \ 155 155 "${util-linux}/bin/mount"
+7 -7
pkgs/os-specific/linux/sgx/sdk/default.nix
··· 109 109 }; 110 110 in 111 111 '' 112 - header "Setting up IPP crypto build artifacts" 112 + echo "Setting up IPP crypto build artifacts" 113 113 114 114 pushd 'external/ippcp_internal' 115 115 ··· 149 149 ./linux/installer/bin/sgx_linux_x64_sdk_${version}.bin -prefix $installDir 150 150 installDir=$installDir/sgxsdk 151 151 152 - header "Move files created by installer" 152 + echo "Move files created by installer" 153 153 154 154 mkdir -p $out/bin 155 155 pushd $out ··· 206 206 207 207 208 208 preFixup = '' 209 - header "Strip sgxsdk prefix" 209 + echo "Strip sgxsdk prefix" 210 210 for path in "$out/share/bin/environment" "$out/bin/sgx-gdb"; do 211 211 substituteInPlace $path --replace "$TMPDIR/sgxsdk" "$out" 212 212 done 213 213 214 - header "Fixing pkg-config files" 214 + echo "Fixing pkg-config files" 215 215 sed -i "s|prefix=.*|prefix=$out|g" $out/lib/pkgconfig/*.pc 216 216 217 - header "Fixing SGX_SDK default in samples" 217 + echo "Fixing SGX_SDK default in samples" 218 218 substituteInPlace $out/share/SampleCode/LocalAttestation/buildenv.mk \ 219 219 --replace '/opt/intel/sgxsdk' "$out" 220 220 for file in $out/share/SampleCode/*/Makefile; do ··· 222 222 --replace '/opt/intel/sgxsdk' "$out" 223 223 done 224 224 225 - header "Fixing BINUTILS_DIR in buildenv.mk" 225 + echo "Fixing BINUTILS_DIR in buildenv.mk" 226 226 substituteInPlace $out/share/bin/buildenv.mk \ 227 227 --replace 'BINUTILS_DIR ?= /usr/local/bin' \ 228 228 'BINUTILS_DIR ?= ${BINUTILS_DIR}' 229 229 230 - header "Fixing GDB path in bin/sgx-gdb" 230 + echo "Fixing GDB path in bin/sgx-gdb" 231 231 substituteInPlace $out/bin/sgx-gdb --replace '/usr/local/bin/gdb' '${gdb}/bin/gdb' 232 232 ''; 233 233
+28 -38
pkgs/stdenv/generic/setup.sh
··· 1 1 # shellcheck shell=bash 2 + # shellcheck disable=1090,2154,2123,2034,2178,2048 2 3 __nixpkgs_setup_set_original=$- 3 4 set -eu 4 5 set -o pipefail ··· 32 33 export NIX_ATTRS_JSON_FILE="$NIX_BUILD_TOP/.attrs.json" 33 34 export NIX_ATTRS_SH_FILE="$NIX_BUILD_TOP/.attrs.sh" 34 35 else 35 - : ${outputs:=out} 36 + : "${outputs:=out}" 36 37 fi 37 38 38 39 getAllOutputNames() { ··· 124 125 125 126 ###################################################################### 126 127 # Logging. 127 - 128 - # Obsolete. 129 - stopNest() { true; } 130 - header() { echo "$1"; } 131 - closeNest() { true; } 132 128 133 129 # Prints a command such that all word splits are unambiguous. We need 134 130 # to split the command in three parts because the middle format string ··· 398 394 # implementation uses zip archive and zip does not support dates going back to 399 395 # 1970. 400 396 export SOURCE_DATE_EPOCH 401 - : ${SOURCE_DATE_EPOCH:=315532800} 397 + : "${SOURCE_DATE_EPOCH:=315532800}" 402 398 403 399 404 400 # Wildcard expansions that don't match should expand to an empty list. ··· 448 444 449 445 # Package accumulators 450 446 451 - # shellcheck disable=SC2034 452 447 declare -a pkgsBuildBuild pkgsBuildHost pkgsBuildTarget 453 448 declare -a pkgsHostHost pkgsHostTarget 454 449 declare -a pkgsTargetTarget ··· 473 468 declare -a pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) 474 469 475 470 # those variables are declared here, since where and if they are used varies 476 - # shellcheck disable=SC2034 477 471 declare -a preFixupHooks fixupOutputHooks preConfigureHooks postFixupHooks postUnpackHooks unpackCmdHooks 478 472 479 473 # Add env hooks for all sorts of deps with the specified host offset. ··· 610 604 # in each list must be store paths, and therefore space-free. 611 605 612 606 # Make sure all are at least defined as empty 613 - : ${depsBuildBuild=} ${depsBuildBuildPropagated=} 614 - : ${nativeBuildInputs=} ${propagatedNativeBuildInputs=} ${defaultNativeBuildInputs=} 615 - : ${depsBuildTarget=} ${depsBuildTargetPropagated=} 616 - : ${depsHostHost=} ${depsHostHostPropagated=} 617 - : ${buildInputs=} ${propagatedBuildInputs=} ${defaultBuildInputs=} 618 - : ${depsTargetTarget=} ${depsTargetTargetPropagated=} 607 + : "${depsBuildBuild=}" "${depsBuildBuildPropagated=}" 608 + : "${nativeBuildInputs=}" "${propagatedNativeBuildInputs=}" "${defaultNativeBuildInputs=}" 609 + : "${depsBuildTarget=}" "${depsBuildTargetPropagated=}" 610 + : "${depsHostHost=}" "${depsHostHostPropagated=}" 611 + : "${buildInputs=}" "${propagatedBuildInputs=}" "${defaultBuildInputs=}" 612 + : "${depsTargetTarget=}" "${depsTargetTargetPropagated=}" 619 613 620 614 for pkg in ${depsBuildBuild[@]} ${depsBuildBuildPropagated[@]}; do 621 615 findInputs "$pkg" -1 -1 ··· 798 792 unset _XDG_DATA_DIRS 799 793 800 794 801 - # Make GNU Make produce nested output. 802 - export NIX_INDENT_MAKE=1 803 - 804 - 805 795 # Normalize the NIX_BUILD_CORES variable. The value might be 0, which 806 796 # means that we're supposed to try and auto-detect the number of 807 797 # available CPU cores at run-time. ··· 888 878 # fail loudly if provided with a binary (containing null bytes) 889 879 consumeEntire() { 890 880 # read returns non-0 on EOF, so we want read to fail 891 - if IFS='' read -r -d '' $1 ; then 881 + if IFS='' read -r -d '' "$1" ; then 892 882 echo "consumeEntire(): ERROR: Input null bytes, won't process" >&2 893 883 return 1 894 884 fi ··· 1033 1023 1034 1024 unpackFile() { 1035 1025 curSrc="$1" 1036 - header "unpacking source archive $curSrc" 3 1026 + echo "unpacking source archive $curSrc" 1037 1027 if ! runOneHook unpackCmd "$curSrc"; then 1038 1028 echo "do not know how to unpack source archive $curSrc" 1039 1029 exit 1 ··· 1079 1069 # Find the source directory. 1080 1070 1081 1071 # set to empty if unset 1082 - : ${sourceRoot=} 1072 + : "${sourceRoot=}" 1083 1073 1084 1074 if [ -n "${setSourceRoot:-}" ]; then 1085 1075 runOneHook setSourceRoot ··· 1130 1120 fi 1131 1121 1132 1122 for i in "${patchesArray[@]}"; do 1133 - header "applying patch $i" 3 1123 + echo "applying patch $i" 1134 1124 local uncompress=cat 1135 1125 case "$i" in 1136 1126 *.gz) ··· 1183 1173 runHook preConfigure 1184 1174 1185 1175 # set to empty if unset 1186 - : ${configureScript=} 1176 + : "${configureScript=}" 1187 1177 1188 1178 if [[ -z "$configureScript" && -x ./configure ]]; then 1189 1179 configureScript=./configure ··· 1445 1435 echo "no Makefile or custom installCheckPhase, doing nothing" 1446 1436 #TODO(@oxij): should flagsArray influence make -n? 1447 1437 elif [[ -z "${installCheckTarget:-}" ]] \ 1448 - && ! make -n ${makefile:+-f $makefile} ${installCheckTarget:-installcheck} >/dev/null 2>&1; then 1438 + && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" >/dev/null 2>&1; then 1449 1439 echo "no installcheck target in ${makefile:-Makefile}, doing nothing" 1450 1440 else 1451 1441 # Old bash empty array hack ··· 1494 1484 showPhaseHeader() { 1495 1485 local phase="$1" 1496 1486 case "$phase" in 1497 - unpackPhase) header "unpacking sources";; 1498 - patchPhase) header "patching sources";; 1499 - configurePhase) header "configuring";; 1500 - buildPhase) header "building";; 1501 - checkPhase) header "running tests";; 1502 - installPhase) header "installing";; 1503 - fixupPhase) header "post-installation fixup";; 1504 - installCheckPhase) header "running install tests";; 1505 - *) header "$phase";; 1487 + unpackPhase) echo "unpacking sources";; 1488 + patchPhase) echo "patching sources";; 1489 + configurePhase) echo "configuring";; 1490 + buildPhase) echo "building";; 1491 + checkPhase) echo "running tests";; 1492 + installPhase) echo "installing";; 1493 + fixupPhase) echo "post-installation fixup";; 1494 + installCheckPhase) echo "running install tests";; 1495 + *) echo "$phase";; 1506 1496 esac 1507 1497 } 1508 1498 ··· 1512 1502 local startTime="$2" 1513 1503 local endTime="$3" 1514 1504 local delta=$(( endTime - startTime )) 1515 - (( $delta < 30 )) && return 1505 + (( delta < 30 )) && return 1516 1506 1517 1507 local H=$((delta/3600)) 1518 1508 local M=$((delta%3600/60)) 1519 1509 local S=$((delta%60)) 1520 1510 echo -n "$phase completed in " 1521 - (( $H > 0 )) && echo -n "$H hours " 1522 - (( $M > 0 )) && echo -n "$M minutes " 1511 + (( H > 0 )) && echo -n "$H hours " 1512 + (( M > 0 )) && echo -n "$M minutes " 1523 1513 echo "$S seconds" 1524 1514 } 1525 1515 ··· 1561 1551 if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then continue; fi 1562 1552 1563 1553 if [[ -n $NIX_LOG_FD ]]; then 1564 - echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&$NIX_LOG_FD 1554 + echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD" 1565 1555 fi 1566 1556 1567 1557 showPhaseHeader "$curPhase"
-2
pkgs/tools/package-management/nix/nix-perl.nix
··· 40 40 ]; 41 41 42 42 preConfigure = "export NIX_STATE_DIR=$TMPDIR"; 43 - 44 - preBuild = "unset NIX_INDENT_MAKE"; 45 43 }
+3 -3
pkgs/top-level/make-tarball.nix
··· 47 47 opts=(--option build-users-group "") 48 48 nix-store --init 49 49 50 - header "checking eval-release.nix" 50 + echo "checking eval-release.nix" 51 51 nix-instantiate --eval --strict --show-trace ./maintainers/scripts/eval-release.nix > /dev/null 52 52 53 - header "checking find-tarballs.nix" 53 + echo "checking find-tarballs.nix" 54 54 nix-instantiate --readonly-mode --eval --strict --show-trace --json \ 55 55 ./maintainers/scripts/find-tarballs.nix \ 56 56 --arg expr 'import ./maintainers/scripts/all-tarballs.nix' > $TMPDIR/tarballs.json ··· 61 61 exit 1 62 62 fi 63 63 64 - header "generating packages.json" 64 + echo "generating packages.json" 65 65 mkdir -p $out/nix-support 66 66 echo -n '{"version":2,"packages":' > tmp 67 67 nix-env -f . -I nixpkgs=$src -qa --meta --json --arg config 'import ${./packages-config.nix}' "''${opts[@]}" >> tmp
+1 -1
pkgs/top-level/nixpkgs-basic-release-checks.nix
··· 32 32 33 33 # Check that all-packages.nix evaluates on a number of platforms without any warnings. 34 34 for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do 35 - header "checking Nixpkgs on $platform" 35 + echo "checking Nixpkgs on $platform" 36 36 37 37 # To get a call trace; see https://nixos.org/manual/nixpkgs/stable/#function-library-lib.trivial.warn 38 38 # Relies on impure eval