Fixing uv's managed Python on NixOS: two patterns that actually work
tdhopper · x · 2026-12-02
NixOS doesn't follow the Filesystem Hierarchy Standard—shared libraries live under /nix/store and the dynamic linker path that prebuilt binaries hardcode doesn't exist. So uv's runtime-downloaded python-build-standalone interpreters fail immediately with "Could not start dynamically linked executable".
Tim Hopper's guide covers two fixes:
- Pattern 1 (system-wide): enable nix-ld so unpatched binaries downloaded by uv can find their dynamic linker and libraries—uv works everywhere.
- Pattern 2 (flake.nix dev shell): pin uv per project and set NIXLD and NIXLDLIBRARYPATH in the flake; note the flake can't create /lib64's linker itself, so the nix-ld shim must still exist on the host.
Pick Pattern 1 for uv everywhere, add Pattern 2 when a repo should carry its own uv version and library list.
More from coding & agent
- Codex spotted using computer use to drive Notion AI to complete a task — TheZachMueller · 2026-12-02
- shadcn: AI coding turned hundreds of lines of UI code into composable agent-friendly behaviors — shadcn · 2026-12-02
- The Oasis: open-source tool turns your Claude Code sessions into 3D village characters — LeviTurk · 2026-12-02
- Mirelo MCP generates game music, SFX and dubbing in one conversation — HeyNayeem · 2026-12-02
- Telegram open-sources Dictator, a Mac AI agent running Hermes in an isolated Linux VM — Teknium · 2026-12-02
- More harness adapters coming: Inkling-2-Mini cuts tool calls 40% after RL training — yb2698 · 2026-12-02