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.
Contributor
|
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
❯ |
Contributor
Author
Contributor
Author
|
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
cloutiertyler
approved these changes
Oct 20, 2025
Contributor
cloutiertyler
left a comment
There was a problem hiding this comment.
Low risk PR, let's get this in to fix issues with building on nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 checklocally.nix buildlocally and then didspacetime start, got an apparently-responsive SpacetimeDB.nix developlocally, thencargo buildandcargo testin the dev shell.