planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
227 stars 10 forks source link

Missing nakefile in Nimble path #32

Closed optik-aper closed 2 years ago

optik-aper commented 2 years ago

The instructions for installation using nimble appear to be missing a step:

cd $(nimble path naylib)
nake buildDesktop
No nakefile.nim found. Current working dir is /home/michael/.nimble/pkgs/naylib-1.6.0

The files in the naylib nimble directory:

naylib.nimble  nimblemeta.json  raylib.nim  raymath.nim

os: Ubuntu 20.04 version: 1.6.0 installed via nimble install with naylib in requires

planetis-m commented 2 years ago

nimble removes stuff it shouldn't. I asked for help but I don't know how to fix this. Alternatively clone the project manually.

planetis-m commented 2 years ago

Sorry won't fix, get a better package manager. It's not my fault nimble removes files from my package. None asked it to do that.

planetis-m commented 2 years ago

Ideally for nimble a hybrid package could be created (and that was attempted before in https://github.com/planetis-m/naylib/commit/70c1600a20998354ac3fd40e2204af765a028321). Then you would call nayget myproject and it would fork the the naylib-template (not done yet). It would also clone raysan5/raylib and create a shared lib for the target platform and the appropriate .nims with the passC/passL commands to correctly link it, inside the project dir. However that work met some obstacles. For one I couldn't make --passL: incldir / "include" work inside a .nims file. It gets passed to the C compiler as clang -c -w -ferror-limit=3 -pthread ("-I" / inclDir). cinfig.nims:

import os
const inclDir = currentSourcePath().parentDir / "../naylib/include"
switch("passC", "-I" & inclDir)
planetis-m commented 2 years ago

Fixed but if I want to support the thing described above, I will have to break everything again.