| Read the clock in the reader's zone when /etc/localtime is a file bffe879 nandi 18d ago | 1 | # Working in this repo |
| 2 | |
| 3 | ## Nix |
| 4 | |
| Follow the xorg renames, and stop wrapping nix in distrobox a400a00 nandi 16d ago | 5 | You are already running inside the Arch distrobox, where `nix` lives, so run |
| 6 | nix commands directly — do not wrap them in `distrobox enter`: |
| Read the clock in the reader's zone when /etc/localtime is a file bffe879 nandi 18d ago | 7 | |
| 8 | ```bash |
| Follow the xorg renames, and stop wrapping nix in distrobox a400a00 nandi 16d ago | 9 | nix build .#frq |
| Read the clock in the reader's zone when /etc/localtime is a file bffe879 nandi 18d ago | 10 | ``` |
| 11 | |
| Split the tree three ways, and let the phone be Flutter's 7070931 nandi 7d ago | 12 | A remote builder (`eu.nixbuild.net`) is already configured here. Large builds |
| 13 | want `--store ssh-ng://eu.nixbuild.net --eval-store auto` rather than a |
| 14 | `builders` entry, so the whole graph stays there and only .drv files go up — |
| 15 | libjoltcosmic's dependency tree is the one that makes this worth remembering. |
| Read the clock in the reader's zone when /etc/localtime is a file bffe879 nandi 18d ago | 16 | |
| Follow the xorg renames, and stop wrapping nix in distrobox a400a00 nandi 16d ago | 17 | One thing this container is *not* representative of: `/etc/localtime` is a |
| 18 | regular file here rather than a symlink, so anything that reads the zone out |
| Read the clock in the reader's zone when /etc/localtime is a file bffe879 nandi 18d ago | 19 | of its path sees nothing. That is a real deployment shape, not an artefact — |
| 20 | frq.clock handles it. |
| Split the tree three ways, and let the phone be Flutter's 7070931 nandi 7d ago | 21 | |
| 22 | ## The three source trees |
| 23 | |
| 24 | ``` |
| 25 | common/ .cljc jolt AND ClojureDart |
| 26 | src/ .clj jolt only |
| 27 | flutter/ .cljd ClojureDart only |
| 28 | ``` |
| 29 | |
| 30 | The extension is the boundary, not a convention: ClojureDart reads `.cljd` and |
| 31 | `.cljc` and never `.clj`, jolt reads all three. So the rule for anything under |
| 32 | `common/` is that it may not require `jolt.*`, `glimmer*` or a `dart:` library |
| 33 | — if it needs the host, it asks `frq.io`, and the backend that installed itself |
| 34 | answers. `frq.io.jolt` is required for its side effect by `frq.app`; |
| 35 | `frq.io.dart` is installed by `flutter/src/frq/main.cljd`, which has to await |
| 36 | the storage directory first. |
| 37 | |
| 38 | Adding a host call means adding it to the seam in `common/frq/io.cljc` and to |
| 39 | both implementations. Name it for the result rather than the mechanism — the |
| 40 | seam has `write-private-file!` and not a chmod, because Dart has no chmod. |
| 41 | |
| Paint the desktop with Flutter too, beside libcosmic fc5f63c nandi 7d ago | 42 | `flutter/` builds two things, from one `clojure -M:cljd compile`: |
| 43 | |
| 44 | `just apk`, out of the flake's own `.#flutter` shell (clojure, jdk17, flutter) |
| 45 | and its `.#android-sdk` package. Impure on purpose: Gradle fetches its own |
| 46 | dependencies and writes into `ANDROID_HOME`, so the recipe copies the store SDK |
| 47 | to `flutter/.home` and lets it finish there. It is the only APK there is — the |
| 48 | jolt APK, `nix/android.nix`, `android/` and the `.#apk` outputs are gone, |
| 49 | because every backend that APK could paint with is retired. |
| 50 | |
| 51 | `just flutter-desktop`, out of `.#flutter-desktop` (the same clojure and |
| 52 | flutter, with cmake, ninja, pkg-config and gtk3 where the JDK and the SDK are). |
| 53 | Impure for the network half of the same reasons and no writable-SDK dance, since |
| 54 | nothing writes into the store. nixGL off NixOS, like `just run`. |
| 55 | |
| 56 | So there are two desktop GUIs and they are both first-class: `just run` is |
| 57 | libcosmic under jolt, `just flutter-desktop` is Flutter's Linux target over |
| 58 | `frq.hiccup`. Same screens out of `common/frq/screens/`, two renderers. jvui and |
| 59 | Vidya were experiments and are gone; libcosmic is a desktop window and does not |
| 60 | cross to a phone, which is what the Flutter half is for. |
| 61 | |
| 62 | The consequence for `common/` is that "the phone" is no longer a synonym for |
| 63 | "the ClojureDart side" — two targets compile it. An implementation that branches |
| 64 | on the platform has to ask (`Platform.isAndroid`) rather than assume; see |
| 65 | `frq.io.dart/write-private-file!`, where assuming cost a token its file mode. |
| 66 | See flutter/README.md. |