Nim as a language provides .nimble
files to describe its packages (example of a .nimble
file). I know that the file is parsed by the nimble
package and CLI-tool, as they need the information inside the .nimble
file for their tasks.
I want basically all the information in there, dependencies, author, license, description, version, all of it. So in order to not do the same work twice and potentially run into issues should the format change, I would like to use the nimble
package itself to parse the .nimble
file for me.
I know the correct proc for it, which is getPkgInfoFromFile
, but I can't seem to access it with import nimble/nimblepkg/packageparser
.
Whenever I use that line I receive an error that there is no such file.
What am I doing wrong?
Further: getPkgInfoFromFile
requires an Options
instance that it generates when parsing a CLI command. I don't have a CLI command, so I'm not generating such an instance, can I use the proc somehow without one?