diff options
Diffstat (limited to 'openspec/specs/dynamic-linking-support')
| -rw-r--r-- | openspec/specs/dynamic-linking-support/spec.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/openspec/specs/dynamic-linking-support/spec.md b/openspec/specs/dynamic-linking-support/spec.md new file mode 100644 index 0000000..5bc7fd9 --- /dev/null +++ b/openspec/specs/dynamic-linking-support/spec.md | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # dynamic-linking-support Specification | ||
| 2 | |||
| 3 | ## Purpose | ||
| 4 | |||
| 5 | Lets NixOS hosts built from this flake run prebuilt, foreign (non-Nix-built) dynamically-linked binaries — such as the interpreters and native wheel extensions that developer tools like `uv` fetch at runtime — instead of failing with a missing-interpreter execution error. | ||
| 6 | |||
| 7 | ## Requirements | ||
| 8 | |||
| 9 | ### Requirement: NixOS hosts run foreign dynamically-linked binaries via nix-ld | ||
| 10 | Every NixOS host built from this flake's shared system module SHALL enable `nix-ld`, so that prebuilt binaries linked against a standard (non-NixOS) dynamic loader path execute correctly instead of failing to run. | ||
| 11 | |||
| 12 | #### Scenario: A uv-managed prebuilt Python interpreter executes | ||
| 13 | - **WHEN** `uv python install` downloads a prebuilt CPython interpreter and that interpreter is invoked | ||
| 14 | - **THEN** the interpreter starts successfully instead of failing with a missing-interpreter or "cannot execute binary file" error | ||
| 15 | |||
| 16 | #### Scenario: A native wheel extension loads its shared library dependencies | ||
| 17 | - **WHEN** a Python package installed by `uv` includes a prebuilt native (C-extension) binary that depends on common shared libraries (e.g. `ncurses`, `libffi`, `sqlite`, `readline`, `gdbm`, `expat`, or another library covered by `nix-ld`'s configured library set) | ||
| 18 | - **THEN** the extension loads its dependencies successfully instead of failing with a missing shared library error | ||
| 19 | |||
| 20 | ### Requirement: The nix-ld library set is host-wide and additive | ||
| 21 | The set of libraries made available to foreign binaries via `nix-ld` SHALL be defined once for all NixOS hosts built from this flake's shared system module, and SHALL be extensible by appending further libraries without removing or replacing the existing set. | ||
| 22 | |||
| 23 | #### Scenario: A host-level addition does not remove existing libraries | ||
| 24 | - **WHEN** a NixOS host's own configuration adds an additional library to the nix-ld library set | ||
| 25 | - **THEN** the libraries already provided by the shared system module remain available, unaffected by the addition | ||
