-
Notifications
You must be signed in to change notification settings - Fork 639
Add a nix flake #3422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a nix flake #3422
Conversation
Recently, my hacked-together env stopped working, probably due to our switching linkers. This pushed me to write a proper Nix packaging for SpacetimeDB, complete with flake and development environment.
In my machine I get: nix flake check
> Compiling reqwest v0.11.27
> error: could not find native static library `rusty_v8`, perhaps an -L flag is missing?
>
> error: could not compile `v8` (lib) due to 1 previous error
> warning: build failed, waiting for other jobs to finish...
For full logs, run:
nix log /nix/store/nm6mnvx3zsbpc33dfycvilaxbn4rsjvd-spacetimedb-test-1.6.0.drv
error: build of '/nix/store/nm6mnvx3zsbpc33dfycvilaxbn4rsjvd-spacetimedb-test-1.6.0.drv', '/nix/store/zs5myp6ws05nz94cjz1zkb2gzjw5a2s7-spacetimedb-clippy-1.6.0.drv' failed
SpacetimeDB on HEAD (33ff957) via 🐳 orbstack is 📦 v1.6.0 via .NET v8.0.400 via via 🦀 v1.90.0 via ❄️ impure (nix-shell-env) 🥋 wuur phoebe/nix-flake-and-env | ✅ took 33s
❯ |
I've been able to reproduce locally on a MacOS Nix installation, but not by building without Nix on Mac. Doing the thing described above worked fine and didn't reproduce the issue. Given that I'm blocked on this PR, I think I'm going to make the flake error if built on Darwin with a note and move on. |
…pacetimeDB into phoebe/nix-flake-and-env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber stamp!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low risk PR, let's get this in to fix issues with building on nix
Description of Changes
Recently, my hacked-together env stopped working, probably due to our switching linkers. This pushed me to write a proper Nix packaging for SpacetimeDB, complete with flake and development environment.
Some things I haven't been able to figure out (or in some cases, just haven't bothered with):
spacetime --version
.API and ABI breaking changes
It's a new thing we have to maintain if we're exposing it to users, but I need to maintain it anyways to be able to develop Spacetime, so...
Expected complexity level and risk
1
Testing
nix flake check
locally.nix build
locally and then didspacetime start
, got an apparently-responsive SpacetimeDB.nix develop
locally, thencargo build
andcargo test
in the dev shell.