nim-secp256k1/secp256k1.nimble

36 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-01-05 01:02:25 +00:00
mode = ScriptMode.Verbose
packageName = "secp256k1"
version = "0.6.0.3.2"
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"
skipDirs = @["tests"]
installDirs = @["vendor"]
2018-01-05 01:02:25 +00:00
2023-06-12 14:32:14 +00:00
requires "nim >= 1.6.0",
"stew",
"nimcrypto"
2018-03-28 10:56:26 +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" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
proc build(args, path: string) =
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
proc run(args, path: string) =
build args & " --mm:refc -r", path
2023-04-13 23:09:33 +00:00
if (NimMajor, NimMinor) > (1, 6):
build args & " --mm:orc -r", path
2018-03-28 10:56:26 +00:00
2020-04-17 05:43:30 +00:00
task test, "Tests":
run "--threads:on", "tests/all_tests"
run "--threads:off", "tests/all_tests"