pkginfo
A tiny utility package to extract Nimble information from any .nimble project
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Stars | 8 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2023-05-10 |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install pkginfo
choosenim install pkginfo
git clone https://github.com/openpeeps/pkginfo
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| pkginfo | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/openpeeps/pkginfo |
|---|---|
| Homepage | https://openpeeps.github.io/pkginfo/ |
| Registry Source | github |
README

📦 A tiny utility package to extract Nimble information from any .nimble project
😍 Key Features
- [x] Enable features by a specific dependency 🎉
- [x] Enable Backwards Compatibility support
- [x] Magically
when requires "pkg_name" - [x] Extract all package dependencies (
direct+indirect) - [x] Cache metadata in
pkginfo.jsonin Current Working Project - [x] Meta-programming powered by Nim's Macros 👑
- [x] Open Source |
MITLicense
Installing
nimble install pkginfo
Examples
Get nimble meta data from current working project
import pkginfo
static:
echo pkg().getVersion
echo pkg().getDescription
Use requires macro to determine the current package dependencies and change the way application works.
import pkginfo
when requires "toktok":
# here you can import additional libraries or modules
# execute blocks of code or whatever you need
Extract the version of a package from .nimble project for backwards compatibility support
import pkginfo
when requires "toktok":
when pkg("toktok").getVersion <= v("0.1.1"):
# backwards compatibility support
else:
# code for newer versions
Checking for the current Nim version from main .nimble
when nimVersion() < v "1.6.4":
{.warning: "You are using an older version of Nim".}
Roadmap
- [x] Extract deps info
- [x] Semver support via Semver lib
- [ ] Extend support for Nimble variables
- [x] Handle indirect deps
- [x] Cache dependency metadata in a
pkginfo.json - [x] Add unit tests
- [ ] Test with bigger projects
- [x] Extract pkg info with
nimble dump <pkg> --json - [ ] Handle local packages (linked with
nimble-link)
❤ Contributions
Contribute with code, ideas, bugfixing or you can even donate via PayPal address 🥰
👑 Discover Nim language
What's Nim? Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Find out more about Nim language
Why Nim? Performance, fast compilation and C-like freedom. We want to keep code clean, readable, concise, and close to our intention. Also a very good language to learn in 2022.
🎩 License
Pkginfo is an Open Source Software released under MIT license. Made by Humans from OpenPeep.
Copyright © 2022 OpenPeep & Contributors — All rights reserved.
