Skip to content

Conversation

@manmal
Copy link

@manmal manmal commented Jan 3, 2026

Summary

  • fix string interpolation parse error in plugin assertion message
  • avoid nixpkgs alias conflict by renaming the gateway source argument
  • update gateway source + pnpm deps hash for v2.0.0-beta5
  • default the gateway wrapper to gateway-daemon when no args are passed
  • skip empty plugin state dir mkdir and write config JSON during activation
  • ensure app bundle extraction ignores __MACOSX and copies the real app
  • bump the Clawdis app zip + hash to v2.0.0-beta5
  • bump the batteries bundle name + RFC references to v2.0.0-beta5

Problems encountered during setup (and resolutions)

  1. Nix eval failed at the first home-manager switch

    • Stage: initial switch/evaluation
    • Symptom: error: syntax error, unexpected invalid token in clawdis.nix around a concatStringsSep call.
    • Root cause: the string used \", \" inside a double-quoted Nix string, which breaks parsing.
    • Fix: remove the escaping so Nix parses the message correctly.
  2. Nix eval failed with a src alias error

    • Stage: evaluation while calling the overlay
    • Symptom: The "src" package has been renamed to "simple-revision-control" from nixpkgs aliases.
    • Root cause: clawdis-gateway.nix took a function arg named src, which conflicts with nixpkgs’ src alias handling in overlays.
    • Fix: rename the argument to gatewaySrc and update the call site.
  3. Fixed-output hash mismatches (gateway + pnpm)

    • Stage: build phase after eval succeeded
    • Symptom: hash mismatch for Clawdis source, then pnpm deps.
    • Root cause: upstream release moved to v2.0.0-beta5 and the pnpm lock/deps hash changed.
    • Fix: update nix/sources/clawdis-source.nix and the pnpm deps hash in clawdis-gateway.nix.
  4. Home Manager activation failed when no plugins were enabled

    • Stage: activation (clawdisDirs)
    • Symptom: /bin/mkdir -p printed usage and aborted activation.
    • Root cause: an empty pluginStateDirs list produced a bare mkdir -p call.
    • Fix: guard the mkdir with a non-empty check.
  5. Gateway config file missing at runtime

    • Stage: runtime / first launch
    • Symptom: gateway started without the expected config JSON on disk.
    • Root cause: the config was only provided via home.file, not written during activation.
    • Fix: write clawdis.json in activation so the gateway sees it on startup.
  6. Clawdis app bundle extraction failed

    • Stage: app install
    • Symptom: Clawdis.app not found in the zip due to __MACOSX directory entries.
    • Root cause: find grabbed the resource fork path first.
    • Fix: skip __MACOSX when locating the app bundle.
  7. App zip hash mismatch after bumping to beta5

    • Stage: build phase after app version bump
    • Symptom: fixed-output hash mismatch for the beta5 zip.
    • Root cause: hash updated after prefetch (zip content differs from the guessed hash).
    • Fix: update the fetchzip hash to the correct value.
  8. Bundle metadata still labeled beta4

    • Stage: final build / packaging
    • Symptom: build output name still clawdis-2.0.0-beta4 even though app+gateway were beta5.
    • Root cause: clawdis-batteries.nix name and RFC notes were not bumped.
    • Fix: update bundle name and RFC references to beta5.

@manmal manmal marked this pull request as ready for review January 3, 2026 22:23
Use builtins.hasAttr instead of the ? operator for checking plugin environment variables, which fixes a Nix evaluation error when validating plugin configurations.
@manmal manmal marked this pull request as draft January 4, 2026 06:54
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