From 1f266cfa4048d5c71b39e3f458aa5f1cfa348579 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 24 Sep 2026 20:22:57 +0200 Subject: 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 --- .../specs/dynamic-linking-support/spec.md | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 openspec/changes/archive/2026-09-24-enable-nix-ld/specs/dynamic-linking-support/spec.md (limited to 'openspec/changes/archive/2026-09-24-enable-nix-ld/specs/dynamic-linking-support/spec.md') diff --git a/openspec/changes/archive/2026-09-24-enable-nix-ld/specs/dynamic-linking-support/spec.md b/openspec/changes/archive/2026-09-24-enable-nix-ld/specs/dynamic-linking-support/spec.md new file mode 100644 index 0000000..e859aa4 --- /dev/null +++ b/openspec/changes/archive/2026-09-24-enable-nix-ld/specs/dynamic-linking-support/spec.md @@ -0,0 +1,23 @@ +## Purpose + +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. + +## ADDED Requirements + +### Requirement: NixOS hosts run foreign dynamically-linked binaries via nix-ld +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. + +#### Scenario: A uv-managed prebuilt Python interpreter executes +- **WHEN** `uv python install` downloads a prebuilt CPython interpreter and that interpreter is invoked +- **THEN** the interpreter starts successfully instead of failing with a missing-interpreter or "cannot execute binary file" error + +#### Scenario: A native wheel extension loads its shared library dependencies +- **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) +- **THEN** the extension loads its dependencies successfully instead of failing with a missing shared library error + +### Requirement: The nix-ld library set is host-wide and additive +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. + +#### Scenario: A host-level addition does not remove existing libraries +- **WHEN** a NixOS host's own configuration adds an additional library to the nix-ld library set +- **THEN** the libraries already provided by the shared system module remain available, unaffected by the addition -- cgit v1.3