Open bohendo opened 1 year ago
This is a lot harder than it seems.
Also: nixpkgs has a recent version of vere. Might make more sense to just use that.
I wouldn't put too much work into anything that adds a dependency on bazel or involves delving too much into the bazel build system. We have plans to eventually get away from it.
@barter-simsum what are you planning to move to?
@ilyakooo0 a secret third thing
@barter-simsum it'd be useful to me to know what build system you guys are moving to, as I'm trying to get a build working against a custom toolchain (cosmopolitan libc, specifically.)
Given bazel usage, is it possible to wrap this new build system in the flake.nix file to provide a
nix build .#urbit
command?This would be intended for one-off usage while integrating urbit into other projects, or for easy global installations with
nix-env
ornix profile
, it doesn't need to be fast/incremental as the current bazel-based build system seems great for active development.As a starting point, we could add the following to the flake.nix outputs:
The
buildInputs
use the same build toolchain dependencies as the devShells, and runningnix build .#urbit
seems to kick-off in a way that suggests dependencies are available. But, as is, it fails with:> FATAL: mkdir('/homeless-shelter/.cache/bazel/_bazel_nixbld'): (error: 13): Permission denied
I assume, if we could prevent bazel from caching incremental builds, then we could stop it from accessing the shared cache in
$HOME
. But I'm not familiar with bazel & maybe this kind of configuration isn't possible.Is this rabbit hole worth exploring? Is there any chance that such a nix expression would ever work?
Thank you in advance for any feedback/guidance you all could provide.