easyblock = 'ConfigureMake'

name = 'Rust'
version = '1.22.1'

homepage = 'https://www.rust-lang.org'
description = """Rust is a systems programming language that runs blazingly fast, prevents segfaults,
 and guarantees thread safety."""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}

source_urls = ['https://static.rust-lang.org/dist/']
sources = ['rustc-%(version)s-src.tar.gz']
checksums = ['8b7a42bdd6eb205a8c533eb41b5c42389a88158d060aed1e0f461f68c1fd3fd3']

builddependencies = [
    ('binutils', '2.28'),
    ('CMake', '3.10.0'),
]

configopts = "--enable-extended --sysconfdir=%(installdir)s/etc"

sanity_check_paths = {
    'files': ['bin/cargo', 'bin/rustc', 'bin/rustdoc'],
    'dirs': ['lib/rustlib', 'share/doc', 'share/man'],
}

moduleclass = 'lang'
