Skip to content

Commit

Permalink
deletes vendor/nim-nat-traversal/vendor/libnatpmp-upstream/VERSION on…
Browse files Browse the repository at this point in the history
… macOS
  • Loading branch information
marcinczenko committed Dec 20, 2024
1 parent 0eddb6c commit 42d61e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.nims
Original file line number Diff line number Diff line change
Expand Up @@ -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 <VERSION>" 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"
Expand Down

0 comments on commit 42d61e3

Please sign in to comment.