Skip to content

build: self-contained dev shell; drop the unfetchable darksoil flake input - #13

Open
zippy wants to merge 1 commit into
mainfrom
chore/self-contained-dev-shell
Open

build: self-contained dev shell; drop the unfetchable darksoil flake input#13
zippy wants to merge 1 commit into
mainfrom
chore/self-contained-dev-shell

Conversation

@zippy

@zippy zippy commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Why

The dev shell is inherited from darksoil-studio/tauri-plugin-holochain, whose GitHub repo no longer exists (renamed to p2p-shipyard). The flake input 404s: nix flake update fails outright, and a fresh clone can only enter the dev shell while the locked source still survives in a binary cache — the environment is one cache eviction away from unbuildable.

What

Compose the dev environment locally from holonix main-0.6 and its nixpkgs, the same flake shape as holochain/android-service-runtime (this repo's successor lineage), removing the darksoil dependency entirely:

  • Rust toolchain from rust-toolchain.toml via rust-overlay. The file was stale — 1.81.0 with only x86_64 targets while the build scripts cross-compile for arm64-v8a/x86/x86_64 (the darksoil shell had been supplying its own rust). Now 1.88.0 with the full Android + wasm target list; nix and rustup users stay in sync.
  • Android SDK/NDK from nixpkgs androidenv: platform/buildTools 34 matching the gradle configs, and NDK 28.0.13004108 — the exact NDK the darksoil shell shipped, so produced .so files are unchanged.
  • Tauri Linux desktop libs from holonix's nixpkgs: webkitgtk 2.52.1 replaces the 2.42.5 that the old shell pinned via its webkitnixpkgs input. webkitgtk ≥ 2.44 requires a working EGL display, which nix-built webkit can't find on non-NixOS hosts (nixpkgs libglvnd only searches the NixOS-only /run/opengl-driver), so the shellHook supplies an ordered EGL vendor list — host drivers first (host binaries launched from the shell are unaffected), nixpkgs Mesa as the nix-binary fallback. This replaces the old WEBKIT_DISABLE_COMPOSITING_MODE=1 workaround, which has been a no-op since webkitgtk 2.46. Diagnosed and verified end-to-end in holochain/android-service-runtime@81193a9.
  • HOST_CC/CXX/AR exports so host-targeted units (build scripts, proc-macros) keep the host toolchain under cargo ndk.

flake.lock shrinks from 25 nodes to 11; DEVELOPMENT.md's version-bump note updated.

Verification (all in the new shell)

  • cargo check --workspace --all-targets — clean
  • cargo ndk -t x86_64 check -p holochain-conductor-runtime-ffi — clean (NDK/cargo-ndk path CI uses)
  • ./gradlew tasks configures in libraries/client (JDK 17 + SDK detection)
  • holochain --version on PATH is 0.6.1-rc.7, matching the Cargo.toml pin

CI note: workflows keep working unchanged (nix develop --no-update-lock-file + holochain-ci cachix); the androidenv SDK derivation builds once per self-hosted runner store.

…input

The dev shell came from darksoil-studio/tauri-plugin-holochain, whose
GitHub repo no longer exists (renamed to p2p-shipyard), so the flake
input 404s: `nix flake update` fails outright and a fresh clone can
only enter the shell while the locked source survives in a binary
cache.

Compose the environment locally instead, from holonix main-0.6 and its
nixpkgs (the same shape as holochain/android-service-runtime):

- Rust toolchain from rust-toolchain.toml via rust-overlay. The file
  was stale — 1.81.0 with only x86_64 targets, while the build scripts
  cross-compile for arm64-v8a/x86/x86_64 — because the darksoil shell
  had been supplying its own rust. Now 1.88.0 with the full Android +
  wasm target list, and nix and rustup users stay in sync.
- Android SDK/NDK from nixpkgs androidenv: platform/buildTools 34 to
  match the gradle configs, NDK 28.0.13004108 — the exact NDK the
  darksoil shell shipped, so produced .so files are unchanged.
- Tauri Linux desktop libs from holonix's nixpkgs: webkitgtk 2.52.1
  instead of the 2.42.5 pinned via the old shell's webkitnixpkgs input.
  webkitgtk >= 2.44 needs a working EGL display on non-NixOS hosts, so
  the shellHook supplies an EGL vendor list (host drivers first,
  nixpkgs Mesa as fallback) instead of the old
  WEBKIT_DISABLE_COMPOSITING_MODE=1 (a no-op since webkitgtk 2.46).
- HOST_CC/CXX/AR exports so host-targeted units (build scripts,
  proc-macros) keep the host toolchain under `cargo ndk`.

Verified in the new shell: `cargo check --workspace --all-targets`
clean, `cargo ndk -t x86_64 check -p holochain-conductor-runtime-ffi`
clean, gradle configures in libraries/client, holochain 0.6.1-rc.7 on
PATH matching the Cargo.toml pin.
@zippy
zippy had a problem deploying to Android Service Runtime Release August 13, 2026 14:02 — with GitHub Actions Failure
@zippy
zippy deployed to Android Service Runtime Release August 13, 2026 14:02 — with GitHub Actions Active
@zippy
zippy temporarily deployed to Android Service Runtime Release August 13, 2026 14:02 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant