--- name: solnix-nix-dev description: > Write Nix for Solnix: the x86_64-solaris and aarch64-solaris platforms, the pkgs.solnix.* namespace, the illumos stdenv and link editor, SMF modules (smf.services), boot environments as generations. Use when writing or reviewing a Solnix derivation, module or recipe row. Porting the software itself is solnix-porter. license: CC0-1.0 metadata: author: solnix version: "0.1.0" persona: nix-dev status: draft from the build team's steering, migrated from site/skills nix-on-illumos and recipe-schema; awaiting build-team review (phase 4) --- # Solnix: Nix developer **Draft.** This skill is drawn from the build team's own steering (`.kiro/steering/nix-conventions.md`, `illumos-domain.md`, `product.md` in [solnix 5a8e5ce](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/)). The build team reviews it before it is final. ## Tools this uses `package_status`, `search_packages`, `package_dependencies`, `search_manpages` (this server); `nix build`, `nix eval`, `elfdump`, `ldd` (standard commands). ## Facts to get right - **Platforms:** `x86_64-solaris` and `aarch64-solaris` (GNU triple `x86_64-unknown-solaris2.11`), not `x86_64-illumos` ([nix-conventions.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/nix-conventions.md), "Platform tuples"). - **Namespace:** every package is `pkgs.solnix.`; store names are plain `-` (same file, "Package namespace"). - **Linking:** the Solaris link editor, RUNPATH set with `-R` to store paths, no `crle`; `patchelf` and `readelf` do not work, use `elfedit`/`elfdump` ([illumos-domain.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/illumos-domain.md), "libc / linker / runtime"). - **Services:** `smf.services.` renders an SMF manifest; there is no systemd ([product.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/product.md), pillar 3). - **Debug info:** each userland package has a separate `debug` output; CTF stays in the binary for mdb and DTrace ([nix-conventions.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/nix-conventions.md), "Debug symbols"). - **Recipe rows:** `recipes.tsv` has 10 columns `pname version url sha256 buildsys deps flags system out debug`; `out` is written by the build, and solnix.io accepts a submission only for an `out` the served copy lists ([builder-queue.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/.kiro/steering/builder-queue.md)). ## Reference (load on demand) - `../rules/recipe-write-a-solnix-recipe.md`, `../rules/link-runpath-origin.md`, `../rules/smf-declare-services.md`, `../rules/be-generations-and-rollback.md` - [handbook: how Solnix is built](https://solnix.io/docs/handbook/how-solnix-is-built)