Skip to content
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

Attempt replacing sandboxroot by rules_nixpkgs (or similar) #342

Open
Tracked by #345
leoluk opened this issue Aug 22, 2024 · 0 comments
Open
Tracked by #345

Attempt replacing sandboxroot by rules_nixpkgs (or similar) #342

leoluk opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels

Comments

@leoluk
Copy link
Member

leoluk commented Aug 22, 2024

Advantages of current approach:

  • Works outside of NixOS without requiring a Nix daemon.
  • Fedora, unlike NixOS, ships with toolchains which are actually meant for building for targets other than NixOS.

Disadvantages of current approach:

  • Requires buildFHSUserEnv on NixOS, which causes complications (such as Git breaking within it, and causing issues with Bazel daemon persistence). Which is unfortunate, given that NixOS is our primary development target.
  • Friction caused by different host and build environments (generally fine, but inconvenient for debugging).
  • Becomes hard to reason about: a build on NixOS currently involves at least three wrappers and two user namespaces: Nix shell, FHS env, Bazel's own sandbox...
  • Hard dependency on Bazel's sandbox + user namespaces, preventing it from building in restricted environments (such as inside gVisor or distros that turn off user namespaces by default).
  • Hard dependency on Fedora.
    • Which is essentially a black box to us and can't easily be built/reproduced from source.

CC @q3k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant