New package: goshimmer (#27339)

This commit is contained in:
Bernhard Kaindl 2021-12-02 02:05:30 +01:00 committed by GitHub
parent e590ec6f3f
commit 04519d261d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,40 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Goshimmer(Package):
"""GoShimmer is a prototype node for exploring the implementation of IOTA 2.0"""
homepage = 'https://github.com/iotaledger/goshimmer'
url = 'https://github.com/iotaledger/goshimmer/archive/refs/tags/v0.8.0.tar.gz'
maintainers = ['bernhardkaindl']
version('0.8.0', 'ec515deebf0dd35ff76cd98addae9cfcbf4758ab9eb72eb0f6ff4654f2658980')
depends_on('go@1.16:', type='build')
depends_on('snappy')
depends_on('rocksdb')
depends_on('zstd')
depends_on('zlib')
depends_on('lz4')
@property
def snapbin(self):
return join_path(self.prefix.bin, 'snapshot.bin')
def patch(self):
for file in ['tools/genesis-snapshot/main', 'plugins/messagelayer/parameters']:
filter_file('./snapshot.bin', self.snapbin, file + '.go')
def install(self, spec, prefix):
which('go')('build', '-modcacherw', '-tags', 'rocksdb,netgo')
mkdir(prefix.bin)
install('config.default.json', prefix.bin)
install('goshimmer', prefix.bin)
which('wget')('-O', self.snapbin,
'https://dbfiles-goshimmer.s3.eu-central-1.amazonaws.com/snapshots/nectar/snapshot-latest.bin')
remove_linked_tree(prefix.pkg)