Skip to content

fix(nix): skip av/faster-whisper build checks on aarch64-darwin - #16080

Closed
jerome-benoit wants to merge 1 commit into
NousResearch:mainfrom
jerome-benoit:fix/darwin-av-codesigning
Closed

fix(nix): skip av/faster-whisper build checks on aarch64-darwin#16080
jerome-benoit wants to merge 1 commit into
NousResearch:mainfrom
jerome-benoit:fix/darwin-av-codesigning

Conversation

@jerome-benoit

@jerome-benoit jerome-benoit commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Disables build check phases that dlopen broken ffmpeg-headless dylibs on aarch64-darwin:

  • av: disable pythonImportsCheck and pytestCheckPhase (both load ffmpeg dylibs)
  • faster-whisper: disable pythonImportsCheck (transitively imports av; pytest already off upstream)

Overrides are targeted per-package to preserve binary cache for unrelated packages.

Related Issue

Fixes #15776

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • nix/python.nix: introduce avDarwin and fasterWhisperDarwin — overridden nixpkgs packages with build checks disabled. Used as from for mkPrebuiltOverride in the isAarch64Darwin block.

How to Test

  1. nix build .#packages.aarch64-darwin.default on macOS ARM64
  2. Build succeeds (previously failed with exit code 137 / Killed: 9)

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes
  • I've tested on my platform: macOS 26.4.1 aarch64-darwin

Documentation & Housekeeping

  • N/A — nix packaging only, no docs impact

Context

Note: replaces #15777 which was closed due to corrupted git history.

Copilot AI review requested due to automatic review settings April 26, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Nix packaging override for python312.pkgs.av on aarch64-darwin to avoid build-time import/test checks that are being SIGKILLed due to a known Nix daemon Mach-O codesigning corruption issue, restoring nix build success for macOS ARM64.

Changes:

  • On aarch64-darwin, disables doCheck and clears pythonImportsCheck for the av prebuilt override.
  • Adds inline rationale/comment pointing to the upstream Nix daemon issue/PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nix/python.nix Outdated
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/nix Nix flake, NixOS module, container packaging labels Apr 26, 2026
@jerome-benoit
jerome-benoit force-pushed the fix/darwin-av-codesigning branch 7 times, most recently from df90542 to 1607b40 Compare April 26, 2026 15:31
@jerome-benoit jerome-benoit changed the title fix(nix): skip av pythonImportsCheck on aarch64-darwin fix(nix): skip av build checks on aarch64-darwin Apr 26, 2026
@jerome-benoit
jerome-benoit force-pushed the fix/darwin-av-codesigning branch 5 times, most recently from aa65da9 to 20c692f Compare April 26, 2026 17:54
@jerome-benoit jerome-benoit changed the title fix(nix): skip av build checks on aarch64-darwin fix(nix): skip av/faster-whisper build checks on aarch64-darwin Apr 26, 2026
@jerome-benoit
jerome-benoit force-pushed the fix/darwin-av-codesigning branch 3 times, most recently from 742b3c3 to 25de4e3 Compare April 27, 2026 11:34
The nix daemon's RewritingSink corrupts Mach-O ad-hoc code signatures
on ffmpeg-headless multi-output derivation, causing macOS to SIGKILL
any process that dlopens the broken dylibs.

Disable the failing check phases on av (pythonImportsCheck + pytest)
and faster-whisper (pythonImportsCheck, which transitively loads av).
Override av and faster-whisper individually to preserve binary cache
for unrelated packages.

Drop once NixOS/nix#15638 lands.

Fixes NousResearch#15776
@jerome-benoit
jerome-benoit force-pushed the fix/darwin-av-codesigning branch from 25de4e3 to 839e935 Compare April 27, 2026 11:39
@jerome-benoit

Copy link
Copy Markdown
Contributor Author

Closing — the aarch64-darwin av/faster-whisper build issue is now resolved upstream by #15953 (ef41d3bd), which refactored python.nix to use hacks.nixpkgsPrebuilt with mkPrebuiltOverride for these packages. This is a cleaner approach than the per-package dontUsePytestCheck/dontUsePythonImportsCheck overrides proposed here.

Thank you @alt-glitch for the comprehensive nix refactor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/nix Nix flake, NixOS module, container packaging P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: nix build fails on aarch64-darwin — av/faster-whisper build checks SIGKILLed by codesigning bug

3 participants