mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
I have tested it locally with the following in my local packages_official.json
```
{
"name": "compiler",
"url": "https://github.com/yyoncho/Nim.git/?subdir=compiler",
"method": "git",
"tags": [
"library",
"compiler"
],
"description": "Package providing the Nim compiler binaries plus all its source files that can be used as a library",
"license": "MIT",
"web": "https://github.com/nim-lang/Nim"
},
{
"name": "nimsuggest",
"url": "https://github.com/yyoncho/Nim.git/?nimsuggest=compiler",
"method": "git",
"tags": [
"library",
"compiler"
],
"description": "Package providing the Nim compiler binaries plus all its source files that can be used as a library",
"license": "MIT",
"web": "https://github.com/nim-lang/Nim"
},
```
Then `nimble install compiler`, `nimble install nimsuggest` work as expected.
29 lines
523 B
Nim
29 lines
523 B
Nim
include "../lib/system/compilation.nim"
|
|
version = $NimMajor & "." & $NimMinor & "." & $NimPatch
|
|
author = "Andreas Rumpf"
|
|
description = "Compiler package providing the compiler sources as a library."
|
|
license = "MIT"
|
|
skipDirs = @["."]
|
|
installDirs = @["compiler"]
|
|
|
|
import os
|
|
|
|
var compilerDir = ""
|
|
|
|
before install:
|
|
rmDir("compiler")
|
|
|
|
let
|
|
files = listFiles(".")
|
|
dirs = listDirs(".")
|
|
|
|
mkDir("compiler")
|
|
|
|
for f in files:
|
|
cpFile(f, "compiler" / f)
|
|
|
|
for d in dirs:
|
|
cpDir(d, "compiler" / d)
|
|
|
|
requires "nim"
|