Restructure the project to allow nimble check to pass (#36)

* Restructure the project to allow nimble check to pass

* Add a lock file
This commit is contained in:
zah 2022-06-20 14:31:15 +03:00 committed by GitHub
parent e092373a5c
commit 5340cf1881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 5 deletions

25
nimble.lock Normal file
View File

@ -0,0 +1,25 @@
{
"version": 1,
"packages": {
"nimcrypto": {
"version": "0.5.4",
"vcsRevision": "a5742a9a214ac33f91615f3862c7b099aec43b00",
"url": "https://github.com/cheatfate/nimcrypto",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "f76c87707cd4e96355b8bb6ef27e7f8b0aac1e08"
}
},
"stew": {
"version": "0.1.0",
"vcsRevision": "cdb1f213d073fd2ecbdaf35a866417657da9294c",
"url": "https://github.com/status-im/nim-stew",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "3dd9e4ec78d906b59b6f9bcf74f5f8fa6b5c24fe"
}
}
}
}

View File

@ -12,7 +12,7 @@
import import
strformat, typetraits, strformat, typetraits,
stew/[byteutils, objects, results, ctops], stew/[byteutils, objects, results, ctops],
./secp256k1_abi ./secp256k1/abi
from nimcrypto/utils import burnMem from nimcrypto/utils import burnMem
@ -21,7 +21,7 @@ export results
# Implementation notes # Implementation notes
# #
# The goal of this wrapper is to create a thin layer on top of the API presented # The goal of this wrapper is to create a thin layer on top of the API presented
# in secp256k1_abi, exploiting some of its regulatities to make it slightly more # in secp256k1/abi, exploiting some of its regulatities to make it slightly more
# convenient to use from Nim # convenient to use from Nim
# #
# * Types like keys and signatures are guaranteed to hold valid values which # * Types like keys and signatures are guaranteed to hold valid values which

View File

@ -5,7 +5,8 @@ version = "0.5.2"
author = "Status Research & Development GmbH" author = "Status Research & Development GmbH"
description = "A wrapper for the libsecp256k1 C library" description = "A wrapper for the libsecp256k1 C library"
license = "Apache License 2.0" license = "Apache License 2.0"
installDirs = @[".", "secp256k1_wrapper"] skipDirs = @["tests"]
installDirs = @["secp256k1_wrapper"]
requires "nim >= 1.2.0" requires "nim >= 1.2.0"
requires "stew" requires "stew"

View File

@ -3,7 +3,7 @@ from os import DirSep, AltSep, quoteShell
const const
wrapperPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0] & wrapperPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0] &
"/secp256k1_wrapper" "/../secp256k1_wrapper"
internalPath = wrapperPath & "/secp256k1" internalPath = wrapperPath & "/secp256k1"
srcPath = internalPath & "/src" srcPath = internalPath & "/src"
secpSrc = srcPath & "/secp256k1.c" secpSrc = srcPath & "/secp256k1.c"

View File

@ -1,4 +1,4 @@
import ../secp256k1_abi, unittest import ../secp256k1/abi, unittest
{.used.} {.used.}