Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for parsing dependencies from *.nimble files #343

Open
andrew opened this issue Jul 12, 2017 · 0 comments
Open

Add support for parsing dependencies from *.nimble files #343

andrew opened this issue Jul 12, 2017 · 0 comments

Comments

@andrew
Copy link
Contributor

andrew commented Jul 12, 2017

Details: https://github.com/nim-lang/nimble#creating-packages

Example: https://github.com/nim-lang/nimble/blob/master/nimble.nimble

import ospaths
template thisModuleFile: string = instantiationInfo(fullPaths = true).filename

when fileExists(thisModuleFile.parentDir / "src/nimblepkg/common.nim"):
  # In the git repository the Nimble sources are in a ``src`` directory.
  import src/nimblepkg/common
else:
  # When the package is installed, the ``src`` directory disappears.
  import nimblepkg/common

# Package

version       = nimbleVersion
author        = "Dominik Picheta"
description   = "Nim package manager."
license       = "BSD"

bin = @["nimble"]
srcDir = "src"

# Dependencies

requires "nim >= 0.13.0", "compiler#head"

when defined(nimdistros):
  import distros
  if detectOs(Ubuntu):
    foreignDep "libssl-dev"
  else:
    foreignDep "openssl"

task test, "Run the Nimble tester!":
  withDir "tests":
    exec "nim c -r tester"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant