devbox
devbox copied to clipboard
[WIP][NimPlanner] shell and build
Summary
Added a basic code skeleton for NimPlanner.
How was it tested?
Installing nimble packages doesn't work right now:
β nimble install jsonbuilder
Prompt: No local packages.json found, download it from internet? [y/N]
Answer:
Prompt: jsonbuilder not found in any local packages.json, check internet for updated packages? [y/N]
Answer: y
Downloading Official package list
SIGBUS: Illegal storage access. (Attempt to read from nil?)
zsh: bus error nimble install jsonbuilder
Need to debug it
π€ adding openssl nix package seems to unblock this.
- It wasn't obvious from the error that this was caused by SSL issues.
- Using the
--noSSLChecksflagnimblehadn't unblocked it. Given that installing theopensslnix package fixes this issue, I don't quite understand why that flag hadn't worked. - In desperation, I tried adding
opensslsince we've needed it in other planners and it began working.
Made progress:
- Working hello world: Added a
testdata/nim/hello_worldexample that one can shell into, build image and run image. Image size is ~ 130MB. - Error when using external nimble package: Added a
testdata/nim/json_exampleto see if I can install an external nimble package and run it.
This is running into an error:
devbox/testdata/nim/json_example on ξ savil/nim-lang [β$?] at βΈοΈ jetpack-cloud (savil-srivastava-jetpack-io)
β nimble build
Warning: Using project local deps mode
Verifying dependencies for [email protected]
Info: Dependency on json_builder@any version already satisfied
Verifying dependencies for [email protected]
Building json_example/json_example using c backend
Tip: 2 messages have been suppressed, use --verbose to show them.
Error: Build failed for package: json_example
... Execution failed with exit code 1
... Command: /nix/store/17p8dj2gjfdckyp3vkcb7z2v50p04z3h-x86_64-apple-darwin-nim-wrapper-1.6.6/bin/x86_64-apple-darwin-nim c --colors:on --noNimblePath -d:NimblePkgVersion=0.1.0 --path:/Users/savil/code/jetpack/devbox/testdata/nim/json_example/nimbledeps/pkgs/json_builder-0.1.3 --hints:off -o:/Users/savil/code/jetpack/devbox/testdata/nim/json_example/json_example /Users/savil/code/jetpack/devbox/testdata/nim/json_example/src/json_example.nim
... Output: /Users/savil/code/jetpack/devbox/testdata/nim/json_example/src/json_example.nim:3:19 Error: cannot open file: jsonbuilder/json_builder
Observations:
- I'm new to this, so may not be calling things correctly
- The
--noNimblePathnim compiler option may be messing things up. I'm not sure where that is being set. Could it be in the nix wrapper package? Feels odd.- I tried calling
nimble build --nimblePath:./nimbledeps/pkg/ --noNimblePath=falsebut those added these options in addition to--noNimblePath. Either way, it didn't make a difference.
- I tried calling
