# IT4Innovations
# 2023 LK

easyblock = 'Tarball'

name = 'Julia'
version = '1.8.5'
versionsuffix = '-linux-x86_64'

homepage = 'https://julialang.org'
description = "Julia is a high-level, high-performance dynamic programming language for numerical computing"

toolchain = SYSTEM

source_urls = ['https://julialang-s3.julialang.org/bin/linux/x64/%(version_major_minor)s/']
sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tar.gz']
checksums = ['e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05']

sanity_check_paths = {
    'files': ['bin/julia', 'include/julia/julia.h', 'lib/libjulia.%s' % SHLIB_EXT],
    'dirs': ['bin', 'etc', 'include', 'lib', 'share']
}

sanity_check_commands = ['julia --help']

_depot_paths = ':'.join([
    # default shared directory in install dir
    #'%(installdir)s/share/julia',
    # allow users to add their own packages to Julia
    '~/.julia',
])

modextravars = {
    'JULIA_DEPOT_PATH': _depot_paths,
    # 'set JULIA_HISTORY to user's DEPOT_PATH (~/.julia)
    # by default it will point to the DEPOT_PATH (install dir) of the last module loaded
    # https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_HISTORY
    'JULIA_HISTORY': '~/.julia/logs/repl_history.jl',
}

moduleclass = 'lang'
