
- [x] Replace `version(ver, checksum=None, **kwargs)` signature with `version(ver, checksum=None, *, sha256=..., ...)` explicitly listing all arguments. - [x] Fix various issues in packages: - `tags` instead of `tag` - `default` instead of `preferred` - `sha26` instead of `sha256` - etc Also, use `sha256=...` consistently. Note: setting `sha256` currently doesn't validate the checksum length, so you could do `sha256="a"*32` and it would get checked as `md5`... but that's something for another PR.
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
# Copyright 2013-2023 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.package 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", sha256="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)
|