Nimble: running task before/after install

stisa, Oct 25, 2016

When you install a package through nimble, it performs an action called install. If you are the author of a nimble package, you may want to have nimble run a task before or after your package is installed, for example to git clone a dependency, echo some debug information or whatever. To do this, you can make use of two hooks that nimble provides when using the nimscript format:

They are normally used with tasks, but they work with install too.

Example:

before install:
  echo("Cloning repo..")
  exec("git clone <repolink>")

Tags:

  • nim
  • nimble
  • hooks