2018-01-22 22:23:07 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
|
|
|
packageName = "nimbus"
|
|
|
|
version = "0.1.0"
|
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "An Ethereum 2.0 Sharding Client for Resource-Restricted Devices"
|
|
|
|
license = "Apache License 2.0"
|
2018-06-19 19:17:20 +00:00
|
|
|
skipDirs = @["tests", "examples"]
|
2018-12-24 16:03:27 +00:00
|
|
|
# we can't have the result of a custom task in the "bin" var - https://github.com/nim-lang/nimble/issues/542
|
|
|
|
# bin = @["build/nimbus"]
|
2018-01-22 22:23:07 +00:00
|
|
|
|
2019-02-05 19:15:50 +00:00
|
|
|
requires "nim >= 0.19",
|
2018-12-24 16:03:27 +00:00
|
|
|
"chronicles",
|
2018-05-28 10:22:28 +00:00
|
|
|
"nimcrypto",
|
|
|
|
"stint",
|
2018-07-20 17:02:19 +00:00
|
|
|
"json_rpc",
|
2018-09-15 21:08:29 +00:00
|
|
|
"asyncdispatch2",
|
2019-02-05 19:15:50 +00:00
|
|
|
"bncurve",
|
|
|
|
"https://github.com/status-im/nim-eth",
|
|
|
|
"std_shims"
|
2018-01-30 10:51:13 +00:00
|
|
|
|
2018-09-24 22:25:17 +00:00
|
|
|
proc buildBinary(name: string, srcDir = ".", lang = "c") =
|
|
|
|
if not dirExists "build": mkDir "build"
|
|
|
|
switch("out", ("./build/" & name))
|
|
|
|
setCommand lang, srcDir & name & ".nim"
|
|
|
|
|
2018-05-07 12:41:54 +00:00
|
|
|
proc test(name: string, lang = "c") =
|
2018-12-24 16:03:27 +00:00
|
|
|
--define:"chronicles_log_level=ERROR"
|
2018-04-03 16:09:09 +00:00
|
|
|
--run
|
2018-12-06 23:16:34 +00:00
|
|
|
buildBinary name, "tests/"
|
2018-01-29 17:40:22 +00:00
|
|
|
|
2018-04-03 16:09:09 +00:00
|
|
|
task test, "Run tests":
|
|
|
|
test "all_tests"
|
2019-01-09 11:41:18 +00:00
|
|
|
# debugging tools don't yet have tests
|
|
|
|
# but they should be compilable
|
2019-01-11 06:53:18 +00:00
|
|
|
exec "nim c premix/premix"
|
|
|
|
exec "nim c premix/persist"
|
|
|
|
exec "nim c premix/debug"
|
|
|
|
exec "nim c premix/dumper"
|
2019-01-23 12:59:26 +00:00
|
|
|
exec "nim c premix/hunter"
|
2018-09-24 22:25:17 +00:00
|
|
|
|
|
|
|
task nimbus, "Build Nimbus":
|
|
|
|
buildBinary "nimbus", "nimbus/"
|
2018-12-24 16:03:27 +00:00
|
|
|
|