···1516 patches =
17 [
18- # Provide nested log output for subsequent pretty-printing by
19- # nix-log2xml.
20- ./log.patch
21-22 # Purity: don't look for library dependencies (of the form
23 # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway.
24 # Likewise, when searching for included Makefiles, don't look in
···1516 patches =
17 [
000018 # Purity: don't look for library dependencies (of the form
19 # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway.
20 # Likewise, when searching for included Makefiles, don't look in
···77######################################################################
78# Logging.
7980-nestingLevel=0
81-82-startNest() {
83- # Assert natural as sanity check.
84- let nestingLevel+=1 "nestingLevel>=0"
85- echo -en "\033[$1p"
86-}
87-88-stopNest() {
89- # Assert natural as sanity check.
90- let nestingLevel-=1 "nestingLevel>=0"
91- echo -en "\033[q"
92-}
93-94-header() {
95- startNest "$2"
96- echo "$1"
97-}
98-99-# Make sure that even when we exit abnormally, the original nesting
100-# level is properly restored.
101-closeNest() {
102- while [ $nestingLevel -gt 0 ]; do
103- stopNest
104- done
105-}
106107# Prints a command such that all word splits are unambiguous. We need
108# to split the command in three parts because the middle format string
···122exitHandler() {
123 exitCode=$?
124 set +e
125-126- closeNest
127128 if [ -n "$showBuildStats" ]; then
129 times > "$NIX_BUILD_TOP/.times"
···593 echo "do not know how to unpack source archive $curSrc"
594 exit 1
595 fi
596- stopNest
597}
598599···688 # "2>&1" is a hack to make patch fail if the decompressor fails (nonexistent patch, etc.)
689 # shellcheck disable=SC2086
690 $uncompress < "$i" 2>&1 | patch ${patchFlags:--p1}
691- stopNest
692 done
693694 runHook postPatch
···973 echo
974 echo "@ phase-succeeded $out $curPhase"
975 fi
976-977- stopNest
978 done
979}
980
···77######################################################################
78# Logging.
7980+# Obsolete.
81+stopNest() { true; }
82+header() { echo "$1"; }
83+closeNest() { true; }
00000000000000000000008485# Prints a command such that all word splits are unambiguous. We need
86# to split the command in three parts because the middle format string
···100exitHandler() {
101 exitCode=$?
102 set +e
00103104 if [ -n "$showBuildStats" ]; then
105 times > "$NIX_BUILD_TOP/.times"
···569 echo "do not know how to unpack source archive $curSrc"
570 exit 1
571 fi
0572}
573574···663 # "2>&1" is a hack to make patch fail if the decompressor fails (nonexistent patch, etc.)
664 # shellcheck disable=SC2086
665 $uncompress < "$i" 2>&1 | patch ${patchFlags:--p1}
0666 done
667668 runHook postPatch
···947 echo
948 echo "@ phase-succeeded $out $curPhase"
949 fi
00950 done
951}
952