2018-01-05 01:02:25 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
|
|
|
packageName = "secp256k1"
|
2023-04-26 14:23:30 +00:00
|
|
|
version = "0.6.0.3.1"
|
2018-02-27 17:50:01 +00:00
|
|
|
author = "Status Research & Development GmbH"
|
2018-01-05 01:02:25 +00:00
|
|
|
description = "A wrapper for the libsecp256k1 C library"
|
2018-02-27 17:50:01 +00:00
|
|
|
license = "Apache License 2.0"
|
2022-06-20 11:31:15 +00:00
|
|
|
skipDirs = @["tests"]
|
2023-04-26 14:23:30 +00:00
|
|
|
installDirs = @["vendor"]
|
2018-01-05 01:02:25 +00:00
|
|
|
|
2023-06-12 14:32:14 +00:00
|
|
|
requires "nim >= 1.6.0",
|
2022-11-19 15:50:01 +00:00
|
|
|
"stew",
|
|
|
|
"nimcrypto"
|
2018-03-28 10:56:26 +00:00
|
|
|
|
2022-11-19 15:50:01 +00:00
|
|
|
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
|
|
|
|
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
|
|
|
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
|
|
|
let verbose = getEnv("V", "") notin ["", "0"]
|
|
|
|
|
|
|
|
let cfg =
|
2023-06-12 14:32:14 +00:00
|
|
|
" --styleCheck:usages --styleCheck:error" &
|
2022-11-19 15:50:01 +00:00
|
|
|
(if verbose: "" else: " --verbosity:0 --hints:off") &
|
2022-11-23 08:03:07 +00:00
|
|
|
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
|
2022-11-19 15:50:01 +00:00
|
|
|
|
|
|
|
proc build(args, path: string) =
|
|
|
|
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
|
|
|
|
|
|
|
|
proc run(args, path: string) =
|
|
|
|
build args & " -r", path
|
2023-04-13 23:09:33 +00:00
|
|
|
if (NimMajor, NimMinor) > (1, 6):
|
|
|
|
build args & " --mm:refc -r", path
|
2018-03-28 10:56:26 +00:00
|
|
|
|
2020-04-17 05:43:30 +00:00
|
|
|
task test, "Tests":
|
2022-11-19 15:50:01 +00:00
|
|
|
run "--threads:on", "tests/all_tests"
|
|
|
|
run "--threads:off", "tests/all_tests"
|