From 42d61e38cc5bae215025348c1b9a45f6777d91db Mon Sep 17 00:00:00 2001 From: Marcin Czenko Date: Fri, 20 Dec 2024 04:47:20 +0100 Subject: [PATCH] deletes vendor/nim-nat-traversal/vendor/libnatpmp-upstream/VERSION on macOS --- build.nims | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.nims b/build.nims index a9a0e553..12ae6e90 100644 --- a/build.nims +++ b/build.nims @@ -4,6 +4,16 @@ import std/os except commandLineParams ### Helper functions proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = + when defined(macosx): + # temporary fix for teh conflicting "VERSION" file in + # https://github.com/miniupnp/libnatpmp that causes a conflict + # with "#include " from the std library: + proc deleteVersionFile() = + let versionFilePath = "vendor/nim-nat-traversal/vendor/libnatpmp-upstream/VERSION" + echo "deleting " & versionFilePath + if fileExists(versionFilePath): + rmFile(versionFilePath) + deleteVersionFile() if not dirExists "build": mkDir "build" # allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"