nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 191 forks source link

make nimble standalone binary that calls `nim e [args]` #600

Closed timotheecour closed 5 years ago

timotheecour commented 5 years ago

@genotrance said here: https://irclogs.nim-lang.org/04-01-2019.html#22:39:08

<shashlick> i've done a POC and it works

but awaiting a link :-)

note

this could be done by post-processing nimble file with a header and footer, eg: before nimble runs nim e foo.nimble, a temp ~/.cache/nim/nimble/foo.nimble.nims is created with:

var version:string
var author: string
...
var installDirs: seq[string]
proc requires(s: string) = ...

include "foo.nimble"

proc finalize() = ... # if needed

so that this works as regular nimscript:

version = system.NimVersion
author = "Andreas Rumpf"
description = "Compiler package providing the compiler sources as a library."
license = "MIT"

installDirs = @["compiler", "nimsuggest"]

requires "nim >= 0.14.0"
genotrance commented 5 years ago

This is PR #635.