Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hack to find "chart" executable #950

Merged
merged 1 commit into from Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion bin/bench.sh
Expand Up @@ -70,7 +70,19 @@ cabal_which_report() {
local path=$(cabal_which streamly-benchmarks x $1)
if test -z "$path"
then
cabal_which_builddir dist-newstyle streamly-benchmarks x $1
echo "Cannot find $1 executable, trying in dist-newstyle" 1>&2
local path1=$(cabal_which_builddir dist-newstyle streamly-benchmarks x $1)
if test -z "$path1"
then
local path2="./bin/$1"
echo "Cannot find $1 executable, trying $path2" 1>&2
if test -e "$path2"
then
echo $path2
fi
else
echo $path1
fi
else
echo $path
fi
Expand Down
7 changes: 7 additions & 0 deletions default.nix
Expand Up @@ -3,6 +3,13 @@
# To build the chart executable for running bench.sh use:
# nix-shell --argstr c2nix "--flag dev" --run "cabal build chart --flag dev"
#
# You can permanently copy the "chart" executable to "./bin" to pick
# it up irrespective of the compiler/build. Its path is printed by the
# above build command. You can also print its path using the following
# command and then use "cp <path> ./bin" to copy it to "./bin", the bench.sh
# script will pick it up from there:
# nix-shell --argstr c2nix "--flag dev" --run "cabal exec --flag dev -- which chart"
#
# To use ghc-8.6.5
# nix-shell --argstr compiler "ghc865"

Expand Down