diff options
| author | 2026-09-24 20:22:57 +0200 | |
|---|---|---|
| committer | 2026-09-24 20:22:57 +0200 | |
| commit | 1f266cfa4048d5c71b39e3f458aa5f1cfa348579 (patch) | |
| tree | 50510e273156e65adf4f57870517ef28940ad181 /openspec/specs | |
| parent | b0c5452e3bb1e3bdbb27181e331fc959fa43f4fc (diff) | |
| download | desktop-flake-1f266cfa4048d5c71b39e3f458aa5f1cfa348579.tar.gz desktop-flake-1f266cfa4048d5c71b39e3f458aa5f1cfa348579.tar.bz2 desktop-flake-1f266cfa4048d5c71b39e3f458aa5f1cfa348579.zip | |
Enable nix-ld so uv-managed prebuilt binaries run on NixOS
uv fetches prebuilt CPython interpreters and native wheel extensions
that expect a standard glibc loader path, which doesn't exist on
NixOS without nix-ld. Enables it unconditionally on every NixOS host
and extends its library set with common CPython native-extension
dependencies not already covered by nix-ld's own defaults.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'openspec/specs')
| -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 | ||
