Repository navigation
Avoid rebuilding debugpy on macOS by reusing binary cache from nixos-unstable #47
alecandido
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When configuring macOS (
nix-darwin) systems againstnixpkgs-unstable(to ensure binary cache coverage for Darwin packages likenhandatuin), runningnh darwin switchcan still trigger a local build ofdebugpy(pulled as a Neovim DAP server viapkgs.python3Packages.debugpy).nixpkgs-unstable(8edc0c72e3a38faf5434e40d1f19431125fe4b30from 2026-10-08),python3.14-debugpy-1.8.22failed onaarch64-darwin(Hydra Build 348649076).cache.nixos.org(HTTP 404), causing Nix to attempt building it locally from source.debugpyexecutes its full pytest test suite (doCheck = true), which runs hundreds of multi-process attach and socket tests. On macOS, this suite frequently hangs, times out, or fails.Solution
In multi-channel setups where the primary
nixpkgsinput tracksnixos-unstablealongside a dedicatednixpkgs-darwintrackingnixpkgs-unstable:nixos-unstable(7fd4004d0511991fff3a0524856a9be09e28c5f0from 2026-10-11),python3.14-debugpy-1.8.22succeeded on Hydra (Hydra Build 349084456) and is cached oncache.nixos.org(and already fetched in/nix/store).python3Packages.debugpyinsystems/darwin/default.nixwith the package frominputs.nixpkgs, Nix instantly reuses the cached binary with zero build time.Patch
Apply the following patch with
git apply:All reactions