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"
2021-12-27 10:27:55 +00:00
version = "0.5.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 = @["secp256k1_wrapper"]
2018-01-05 01:02:25 +00:00
requires "nim >= 1.2.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 styleCheckStyle = if (NimMajor, NimMinor) < (1, 6): "hint" else: "error"
let cfg =
" --styleCheck:usages --styleCheck:" & styleCheckStyle &
(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 & " -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"