# IT4Innovations 2022
# JK
#16007

# Last contribution from the NIHR Biomedical Research Centre
# Guy's and St Thomas' NHS Foundation Trust and King's College London
# uploaded by J. Sassmannshausen

easyblock = 'MakeCp'

name = 'xxd'
version = '8.2.4220'

homepage = 'https://www.vim.org'
description = """xxd is part of the VIM package and this will only install xxd, not vim!
xxd converts to/from hexdumps of binary files."""

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

source_urls = ['https://github.com/vim/vim/archive/refs/tags']
sources = ['v%(version)s.tar.gz']
checksums = [
    '8b0406834b4f03af8bc6dedbf4c69977f7b9df6905182623842d7c4f3065c604',  # v8.2.4220.tar.gz
]

builddependencies = [
    ('binutils', '2.38'),
]

start_dir = 'src/xxd'

files_to_copy = [
    (['xxd'], 'bin'),
]

sanity_check_paths = {
    'files': ['bin/xxd'],
    'dirs': [],
}

sanity_check_commands = ["xxd -h 2>&1 | grep -A 4 '^Usage:'"]

moduleclass = 'tools'
