Nim icon indicating copy to clipboard operation
Nim copied to clipboard

add `srcDir` variable to nim.cfg

Open Graveflo opened this issue 8 months ago • 0 comments

There might be a way to do this but I couldn't find anything about it. This is a very simple thing that goes a long way in certain situations. Trying to avoid needing to switch to nimscript just to get:

# config.nims
import os
let srcDir = currentSourcePath.parentDir()
switch("define", &"ProjPath:\"{srcDir}\"")

with this change just needs:

# nim.cfg
d %= "ProjPath=$srcDir"

Graveflo avatar Apr 29 '25 11:04 Graveflo