Questions tagged [nimble-nim]

Nimble is the official package manager for Nim language. It allows the creation, publishing, installing, building and other actions to Nim programmers. Use this tag for questions related to Nimble usage or the .nimble file syntax.

Nimble is the package manager for the Nim language. You can use nimble to manage your packages or third-party packages:

  • Install/uninstall packages, either from the official repo or any online or local source.
  • Initialize your own packages.
  • Check the validity of your packages.
  • Test, build and run your code.
  • Publish your packages to the official repo.
  • Build the documentation embedded in your code.

Nimble uses the settings stored in .nimble files to perform all its actions, and the user can also configure any extra tasks in that file.

Nimble coexists with choosenim, that allows Nim users to install, update and select from multiple versions of Nim itself.

8 questions
5
votes
2 answers

How to pass command line arguments to a task?

How do I pass command line arguments to a nimble task? For example, say I have the task task mytask, "my task": echo &"my task {args}" When I run nimble mytask --foo --bar I would like nimble to output mytask --foo --bar or something like…
congusbongus
  • 13,359
  • 7
  • 71
  • 99
3
votes
1 answer

How to enable --threads:on only for files using it?

In a project producing multiple binaries, where only some of them are importing a library (in this case "threadpool") which requires --threads:on to be passed to the compiler, what would the way to handle this? In my nimble file I have something…
Andrea T.
  • 920
  • 4
  • 15
1
vote
1 answer

How do I access parsing of .nimble files from the nimble package?

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…
Philipp Doerner
  • 1,090
  • 7
  • 24
1
vote
2 answers

How to redirect output in a task in nimble

If I have this task in a nimble file: task readme, "generate README.md": exec "nim c -r readme.nim > README.md" with this readme.nim: echo "# Hello\nworld" executing task with nimble (nimble readme) does not redirect the output of readme.nim to…
pietroppeter
  • 1,433
  • 13
  • 30
0
votes
2 answers

Nim's Nimble scripts

Using npm, one can define scripts inside of package.json that can be easily called like npm run It is very handy to compile/start/lint the project How are we suppposed to do this with Nimble when using Nim lang?
Alexandre Daubricourt
  • 3,323
  • 1
  • 34
  • 33
0
votes
0 answers

Azure CI pipeline fails to compile nim project on macos: missing types.h / pthread.h

I have a Bioconda (Anaconda) recipe that worked fine for several releases but failed yesterday with an update that did not introduce any new library or requirement, so I guess it can be due either to updates in unpineed dependencies (I couldn't find…
Andrea T.
  • 920
  • 4
  • 15
0
votes
1 answer

nimble : Warning: Using project local deps mode or how to switch deps mode for nimble

Happy new year, everyone ! :) I tried to run nimble list -i command, but mistyped with nimble list -l and now when I run this nimble list -i command again to get all installed packages ... I get: Warning: Using project local deps mode ... and…
How2
  • 365
  • 1
  • 6
0
votes
1 answer

Pythonic pip freeze in Nim or how to list installed packages?

How to pip freeze command looks for Nim's package manager nimble ?
How2
  • 365
  • 1
  • 6