EmbeddedNim / picostdlib

Nim wrapper for the raspberry pi stdlib
MIT License
70 stars 11 forks source link

Use nimble dump to find the lib path #61

Closed auxym closed 1 year ago

auxym commented 1 year ago

Background: https://forum.nim-lang.org/t/9895

The way getNimLibPath was implemented (by me) worked for choosenim installs (windows or linux) or "native" nim installs on windows, but failed for "native" package manager installs of Nim on Linux, because nim is usually in /usr/bin while nimbase.h gets placed in /usr/lib/nim.

This PR implements elcritch's idea of using nim dump instead. I added some extra checks for robustness (check that what we're returning is actually a directory and that it contains a file named nimbase.h).

beef331 commented 1 year ago

Bump the nimble version please.