This repo contains my global Nim configuration config.nims
(which I
place in the $XDG_CONFIG_HOME/nim/ directory.)
Needs Nim built from its devel
branch (<2018-10-16 Tue>).
nim help
Note that there’s no --
before help
.
That will print:
installPcre Install PCRE using musl-gcc installLibreSsl Install LIBRESSL using musl-gcc installOpenSsl Install OPENSSL using musl-gcc strip Optimize the binary size using 'strip' utility upx Optimize the binary size using 'upx' utility checksums Generate checksums of the binary using 'sha1sum' and 'md5sum' sign Sign the binary using 'gpg' (armored, ascii) encrypt Encrypt the binary using 'gpg' (compressed, symmetric, ascii) musl Build an optimized static binary using musl glibc25 Build C, dynamically linked to GLibC 2.5 (x86_64) js2asm Build JS, print Assembly from that JS (performance debug) c2asm Build C, print Assembly from that C (performance debug) fmt Run nimpretty on all git-managed .nim files in the current repo rmfiles Recursively remove all files with the specific extension(s) from the current directory test Run tests via 'nim doc' (runnableExamples) and tests in tests/ dir docs Deploy doc html + search index to public/ directory runc Run equivalent of 'nim c -r ..' runcpp Run equivalent of 'nim cpp -r ..'
- Create $XDG_CONFIG_HOME/nim/ directory if it doesn’t already
exist (or ~/.config/nim/ if you don’t have
XDG_CONFIG_HOME
environment variable set). - Download the config.nims and put it in that directory.
mkdir --verbose $XDG_CONFIG_HOME/nim/
curl -o $XDG_CONFIG_HOME/nim/config.nims https://raw.githubusercontent.com/kaushalmodi/nim_config/master/config.nims
rm --verbose $XDG_CONFIG_HOME/nim/config.nims
I use this same file during Nim project builds on Travis CI by
including the below in the script:
phase:
git clone https://github.com/kaushalmodi/nim_config && cp nim_config/config.nims .
- Note
- This will overwrite your project-specific
config.nims
(if any) with the version in this repo. That overwrite happens only in that Travis workspace, but still understand what the above command is doing before using it. *** Using thetest
anddocs
tasks
script:
- nim -v
- git clone https://github.com/kaushalmodi/nim_config && cp nim_config/config.nims . # Get my global config.nims
- nim test # The 'test' task is defined in the above retrieved config.nims
- nim docs # The 'docs' task is defined in the above retrieved config.nims
script:
- cd "${TRAVIS_BUILD_DIR}" # Ensure that you are in repo/build root now.
- nimble install --depsOnly --accept
- git clone https://github.com/kaushalmodi/nim_config && cp nim_config/config.nims . # Get my global config.nims
- nim musl "${NIMFILE}" # The ${NIMFILE} var is defined further up in that .travis.yml