julia.withPackages: Disable pretty terminal output during nix build

Prior to this patch, julia would log output destined for a terminal
which can support cursor movements, which we don't have while building
under nix.

The only way I could find to turn this off is to set CI=true during
precompilation, which substantially reduces the amount of log output you
end up with, to only the salient output (one line per package, instead
of many identical lines being printed).

Signed-off-by: Peter Waller <p@pwaller.net>
This commit is contained in:
Peter Waller 2024-05-03 15:25:35 +01:00
parent 4cdd7063d4
commit a4c899381e

View File

@ -55,6 +55,11 @@ runCommand "julia-depot" {
# git config --global --add safe.directory '/nix'
export JULIA_PKG_USE_CLI_GIT="true"
# At time of writing, this appears to be the only way to turn precompiling's
# terminal output into standard logging, so opportunistically do that.
# (Note this is different from JULIA_CI).
export CI=true
julia -e ' \
import Pkg
import Pkg.Types: PRESERVE_NONE