@@ -21,6 +21,7 @@ print_help () {
21 echo " [--quick]"
21 echo " [--quick]"
22 echo " [--raw]"
22 echo " [--raw]"
23 echo " [--dev-build]"
23 echo " [--dev-build]"
24 echo " [--with-compiler <compiler exe name>]"
25 echo " [--with-compiler <compiler exe name>]"
25 echo " [--cabal-build-options <options>]"
26 echo " [--cabal-build-options <options>]"
26 echo " [--rtsopts <opts>]"
27 echo " [--rtsopts <opts>]"
@@ -68,28 +69,13 @@ list_comparisons () {
71−# chart is expensive to build and usually not required to be rebuilt,
72+# chart is expensive to build and usually not required to be rebuilt
72−# use master branch as fallback
73cabal_which_report() {
73cabal_which_report() {
74− local path=$(cabal_which bench-report x $1)
74+ local path="./bin/$1"
77− echo "Cannot find $1 executable, trying in dist-newstyle" 1>&2
78− local path1=$(cabal_which_builddir dist-newstyle bench-report x $1)
79− if test -z "$path1"
75+ if test -e "$path"
81− local path2="./bin/$1"
77+ echo $path
82− echo "Cannot find $1 executable, trying $path2" 1>&2
95find_report_prog() {
81find_report_prog() {
@@ -113,8 +99,16 @@ build_report_prog() {
114 echo "Building bench-report executables"
100 echo "Building bench-report executables"
115 BUILD_ONCE=1
101 BUILD_ONCE=1
102+ pushd benchmark/bench-report
116− $CABAL_EXECUTABLE v2-build bench-report --project-file=benchmark/bench-report/cabal.project \
104+ cmd="$CABAL_EXECUTABLE install --installdir ../../bin bench-report"
105+ if test "$USE_NIX" -eq 0
107+ $cmd || die "bench-report build failed"
117− || die "bench-report build failed"
109+ nix-shell --run "$cmd" || die "bench-report build failed"
119 elif test ! -x "$prog_path"
113 elif test ! -x "$prog_path"
@@ -308,6 +302,7 @@ cd $SCRIPT_DIR/..
309USE_GAUGE=0
303USE_GAUGE=0
310USE_GIT_CABAL=1
304USE_GIT_CABAL=1
311set_common_vars
306set_common_vars
313DEFAULT_FIELDS="allocated bytescopied cputime"
308DEFAULT_FIELDS="allocated bytescopied cputime"
@@ -360,6 +355,7 @@ do
360 --graphs) GRAPH=1; shift ;;
355 --graphs) GRAPH=1; shift ;;
361 --no-measure) MEASURE=0; shift ;;
356 --no-measure) MEASURE=0; shift ;;
362 --dev-build) RUNNING_DEVBUILD=1; shift ;;
357 --dev-build) RUNNING_DEVBUILD=1; shift ;;
358+ --use-nix) USE_NIX=1; shift ;;
363 --use-gauge) USE_GAUGE=1; shift ;;
359 --use-gauge) USE_GAUGE=1; shift ;;
364 --) shift; break ;;
360 --) shift; break ;;
365 *) echo "Unknown flags: $*"; echo; print_help ;;
361 *) echo "Unknown flags: $*"; echo; print_help ;;