-
Notifications
You must be signed in to change notification settings - Fork 0
/
nim.linux.nexss.config.js
48 lines (43 loc) · 1.45 KB
/
nim.linux.nexss.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
let languageConfig = Object.assign({}, require(`./nim.win32.nexss.config`));
let sudo = process.sudo;
languageConfig.compilers = {
nim: {
install: `${sudo}apt-get install -y nim`,
command: "nim",
args: "compile --verbosity:0 --hints:off --run <file>", //&& del <fileNoExt>.exe
help: ``,
},
};
// languageConfig.builders = {
// nim: {
// install: `${sudo}apt-get install -y nim`,
// command: "nimble",
// args: "build --verbosity:0 --hints:off --run <file>", //&& del <fileNoExt>.exe
// help: ``,
// },
// };
const distName = process.distro;
languageConfig.dist = distName;
// TODO: Later to cleanup this config file !!
switch (distName) {
case process.distros.DEBIAN:
case process.distros.UBUNTU:
languageConfig.compilers.nim.install = process.replacePMByDistro(`${sudo}apt-get install -y gcc g++ curl tar nodejs
${sudo}mkdir -p /nim
${sudo}curl -sL "http://nim-lang.org/download/nim-1.2.6.tar.xz"|tar xJ --strip-components=1 -C /nim
cd /nim
${sudo}bash build.sh
${sudo}rm -r c_code tests
${sudo}ln -sf /nim/bin/nim /bin/nim`);
break;
default:
languageConfig.compilers.nim.install = process.replacePMByDistro(`${sudo}apt-get install -y gcc g++ curl tar xz nodejs
${sudo}mkdir -p /nim
${sudo}curl -sL "http://nim-lang.org/download/nim-1.2.6.tar.xz"|tar xJ --strip-components=1 -C /nim
cd /nim
${sudo}bash build.sh
${sudo}rm -r c_code tests
${sudo}ln -sf /nim/bin/nim /bin/nim`);
break;
}
module.exports = languageConfig;