File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,53 @@ author = "zevv"
44description = " Native MQTT client library and binaries"
55license = " MIT"
66srcDir = " src"
7- bin = @ [" nmqtt_pub" , " nmqtt_sub" , " nmqtt_broker" ]
7+ bin = @ [" nmqtt" , " nmqtt_password" , " nmqtt_pub" , " nmqtt_sub" ]
8+ installFiles = @ [" nmqtt.nim" ]
89
910
1011# Dependencies
1112requires " nim >= 1.0.6"
12- requires " https://github.com/c-blake/cligen#36d5218"
13+ requires " bcrypt >= 0.2.1"
14+ requires " https://github.com/c-blake/cligen#36d5218"
15+
16+ from strutils import format
17+
18+ after install:
19+ var path: string
20+
21+ echo " \n Generate default nmqtt.conf? (y/N)"
22+ let genConf = readLineFromStdin ()
23+ if genConf == " y" or genConf == " Y" :
24+ let confPath = " /home/" & getEnv (" USER" ) & " /.config/nmqtt"
25+ echo " \n Absolute path to nmqtt config folder. Default: " & confPath
26+
27+ path = readLineFromStdin ()
28+ if path == " " :
29+ path = confPath
30+
31+ if not dirExists (path):
32+ mkDir (path)
33+
34+ cpFile (" config/nmqtt.conf" , path & " /nmqtt.conf" )
35+ echo " The brokers configuration has been saved at: " & path & " /nmqtt.conf"
36+
37+ echo """
38+
39+ nmqtt v$1 has been installed.
40+
41+
42+ LIBRARY:
43+ Access the nim-libary with an import statement in your code:
44+
45+ `import nmqtt`
46+
47+
48+ BINARIES:
49+ Access the binaries directly with. For help append `--help`.
50+
51+ nmqtt
52+ nmqtt_password
53+ nmqtt_pub
54+ nmqtt_sub
55+
56+ """ .format (version)
You can’t perform that action at this time.
0 commit comments