@@ -7,11 +7,6 @@ import system except getCommand, setCommand, switch, `--`
7
7
import strformat, strutils, tables, sequtils
8
8
export tables
9
9
10
- when (NimMajor , NimMinor ) < (1 , 3 ):
11
- when not defined(nimscript):
12
- import os
13
- else :
14
- import os
15
10
16
11
var
17
12
packageName* = " " # # Set this to the package name. It
32
27
foreignDeps* : seq [string ] = @ [] # # The foreign dependencies. Only
33
28
# # exported for 'distros.nim'.
34
29
35
- nimbleTasks: seq [tuple [name, description: string ]] = @ []
36
- beforeHooks: seq [string ] = @ []
37
- afterHooks: seq [string ] = @ []
38
- flags: Table[string , seq [string ]]
30
+ nimbleTasks* : seq [tuple [name, description: string ]] = @ []
31
+ beforeHooks* : seq [string ] = @ []
32
+ afterHooks* : seq [string ] = @ []
33
+ flags* : Table[string , seq [string ]]
39
34
namedBin* : Table[string , string ]
40
35
41
- command = " e"
42
- project = " "
43
- success = false
44
- retVal = true
45
- nimblePathsEnv = " __NIMBLE_PATHS"
36
+ command* = " e"
37
+ project* = " "
38
+ success* = false
39
+ retVal* = true
40
+ nimblePathsEnv* = " __NIMBLE_PATHS"
46
41
47
42
proc requires* (deps: varargs [string ]) =
48
43
# # Call this to set the list of requirements of your Nimble
@@ -58,11 +53,12 @@ proc taskRequires*(task: string, deps: varargs[string]) =
58
53
59
54
proc getParams(): tuple [scriptFile, projectFile, outFile, actionName: string ,
60
55
commandLineParams: seq [string ]] =
56
+ result = (scriptFile: " " , projectFile: " " , outFile: " " , actionName: " " , commandLineParams: @ [])
61
57
# Called by nimscriptwrapper.nim:execNimscript()
62
58
# nim e --flags /full/path/to/file.nims /full/path/to/file.nimble /full/path/to/file.out action
63
- for i in 2 .. paramCount():
59
+ for i in 2 .. nimscript. paramCount():
64
60
let
65
- param = paramStr(i)
61
+ param = nimscript. paramStr(i)
66
62
if param[0 ] != '-' :
67
63
if result .scriptFile.len == 0 :
68
64
result .scriptFile = param
0 commit comments