diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-17 09:49:42 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-17 09:49:42 -0600 |
| commit | 3d9cf10f8a7f5c779af110faf47211feff029581 (patch) | |
| tree | 99ca631c945df0c4d40079388d8c8e8bc3a23c04 | |
| parent | 4883780f8fe5fec4b2b436192f388a5e81fa4cb8 (diff) | |
| download | nimterop-3d9cf10f8a7f5c779af110faf47211feff029581.tar.gz nimterop-3d9cf10f8a7f5c779af110faf47211feff029581.zip | |
Fix nimble install
| -rw-r--r-- | nimterop/setup.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nimterop/setup.nim b/nimterop/setup.nim index c3edb99..06f15d4 100644 --- a/nimterop/setup.nim +++ b/nimterop/setup.nim @@ -2,6 +2,8 @@ import os, strutils import "."/git +const sourcePath = currentSourcePath().split({'\\', '/'})[0..^3].join("/") & "/inc" + proc treesitterSetup*() = gitPull("https://github.com/tree-sitter/tree-sitter/", "inc/treesitter", """ include/* @@ -14,7 +16,7 @@ src/runtime/* """) let - stack = "inc/treesitter/src/runtime/stack.c" + stack = sourcePath & "/treesitter/src/runtime/stack.c" stack.writeFile(stack.readFile().replace("inline Stack", "Stack")) @@ -26,7 +28,7 @@ src/*.cc """) let - headerc = "inc/treesitter_c/src/parser.h" + headerc = sourcePath & "/treesitter_c/src/parser.h" headerc.writeFile(""" typedef struct TSLanguage TSLanguage; @@ -41,9 +43,9 @@ src/*.cc """) let - headercpp = "inc/treesitter_cpp/src/parser.h" + headercpp = sourcePath & "/treesitter_cpp/src/parser.h" headercpp.writeFile(""" typedef struct TSLanguage TSLanguage; const TSLanguage *tree_sitter_cpp(); - """)
\ No newline at end of file + """) |
