# iT4Innovations 2019

easyblock = 'ConfigureMake'

name = 'Cargo'
version = '0.18.0'

homepage = 'https://crates.io/'
description = "The Rust package manager"

toolchain = SYSTEM

source_urls = ['https://github.com/rust-lang/cargo/archive/']
sources = ['%(version)s.tar.gz']

dependencies = [
    ('Rust', '1.32.0'),
]
builddependencies = [
    ('CMake', '3.13.1'),
    ('Py', '2.7'),
    ('cURL', '7.56.1'),
]

buildopts = 'VERBOSE=1'
# rust-installer is a git submodule, but not included in the sources pulled from GitHub
# see also https://github.com/rust-lang/cargo/issues/2130
preinstallopts = "cp -a %(builddir)s/rust-installer*/* %(builddir)s/cargo-%(version)s/src/rust-installer && "

sanity_check_paths = {
    'files': ['bin/cargo'],
    'dirs': ['etc', 'lib/rustlib', 'share'],
}

moduleclass = 'tools'
