惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
量子位
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
腾讯CDC
I
InfoQ
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
爱范儿
爱范儿

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - jonhermansen/darnix: Darwin system built with Nix
jonhermansen · 2026-05-23 · via Hacker News: Show HN
██████╗  █████╗ ██████╗ ███╗   ██╗██╗██╗  ██╗
██╔══██╗██╔══██╗██╔══██╗████╗  ██║██║╚██╗██╔╝
██║  ██║███████║██████╔╝██╔██╗ ██║██║ ╚███╔╝
██║  ██║██╔══██║██╔══██╗██║╚██╗██║██║ ██╔██╗
██████╔╝██║  ██║██║  ██║██║ ╚████║██║██╔╝ ██╗
╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝╚═╝  ╚═╝

Darnix boot demo

Boot a fully open-source Darwin system using Nix. One command, no macOS install required (beyond the build host).

$ nix run github:jonhermansen/darnix

Boots XNU (macOS 26.4 / xnu-12377.101.15) in QEMU with an HFS+ root filesystem and serial console — all from a single Nix flake. The entire build runs under Nix's strict sandbox (sandbox = true) — no network access, no /dev access, no DMG mounting or hdiutil, no system side effects.

What this is

Darnix is a revival of the PureDarwin idea: run Apple's open-source XNU kernel with an entirely open userland managed by Nix. The long-term goal is a NixOS-style system on a Darwin kernel.

Current status: The kernel boots in QEMU (x86_64 emulated via TCG on aarch64-darwin), mounts an HFS+ ramdisk as root, and executes a statically linked init binary with serial console output. There is no networking, no kext loading, and no userland beyond init.

What we had to do

Nix build system (darwin-xnu-build)

  • Wrapped blacktop/darwin-xnu-build in a Nix flake that builds XNU in a fully sandboxed derivation
  • All Apple open-source dependencies (bootstrap_cmds, dtrace, AvailabilityVersions, Libsystem, libplatform, libdispatch) fetched as flake inputs
  • Xcode SDK and KDK extracted from Apple's downloads and wrapped as Nix derivations
  • nix run builds the kernel, assembles a GRUB EFI image with embedded ramdisk, and launches QEMU

XNU kernel patches (xnu)

QEMU platform support:

  • Built-in platform expert for QEMU (IOQEMUPlatform) — no IOKit kexts needed
  • PRNG fallback when RDRAND/RDSEED are unavailable (QEMU TCG doesn't emulate them)
  • ignore_msrs boot arg for unimplemented MSRs under TCG
  • TSC fallback when MSR_PLATFORM_INFO bus ratio reads as 0
  • EFI runtime mapping skip for QEMU's firmware
  • Default to 1 CPU when ACPI tables are missing

Bare boot (no kexts):

  • Skip networking, pthread shims, trust cache, corecrypto, AMFI
  • Guard subsystems that assume kexts/coalitions/entitlements are present
  • Allow PE_i_can_has_debugger on DEVELOPMENT builds
  • Skip code signing validation when enforcement is disabled

HFS+ as root filesystem:

  • Registered HFS as an in-kernel filesystem
  • Added VFC_VFSCANMOUNTROOT flag so vfs_mountroot() tries HFS
  • Fixed bsd_init console open: FREAD|FWRITEO_RDWR, authfd=0AUTH_OPEN_NOAUTHFD

HFS+ in-kernel build (hfs)

Apple's HFS+ ships as a kext depending on IOKit and corecrypto. We ported it to compile directly into the kernel:

  • Stubbed IOKit helper functions
  • Called hfs_init_zones() from hfs_init() (previously only called from the kext's IOKit entry point)
  • Fixed hfs_getvoluuid() to use a fixed UUID (MD5 requires corecrypto which isn't available)
  • Stubbed AKS (Apple Key Services) for content protection code paths
  • Patched newfs_hfs to format regular files, not just block devices (runs inside Nix sandbox)

GRUB (grub)

  • Fixed xnu_kernel64 page fault loading 64-bit Mach-O kernels
  • Added Nix flake for building GRUB EFI on aarch64-darwin

HFS+ ramdisk image

  • Built with patched newfs_hfs + xpwn's hfsplus tool
  • 8 MB image containing /sbin/launchd and /dev mountpoint
  • Created entirely inside the Nix sandbox — no root, no devices

Architecture

aarch64-darwin host
  └─ nix run
       └─ qemu-system-x86_64 (TCG, software emulation)
            └─ GRUB EFI (grub-mkstandalone)
                 ├─ xnu_kernel64 /boot/kernel
                 ├─ xnu_ramdisk /boot/rootfs-hfs.dmg
                 └─ boot
                      └─ XNU boots
                           ├─ HFS+ root on md0 (ramdisk)
                           ├─ devfs on /dev
                           ├─ serial console (fd 0/1/2)
                           └─ exec /sbin/launchd

Boot options

GRUB presents two menu entries:

Entry Root filesystem Description
Darnix (HFS+) 8 MB HFS+ ramdisk Real filesystem with directory hierarchy
Darnix (mockfs) Raw Mach-O binary Minimal fake FS for debugging (the ramdisk is the binary)

Current limitations

  • x86_64 only — cross-compiled from aarch64-darwin, runs under TCG (software emulation)
  • No networking — network subsystem init is skipped
  • No crypto — corecrypto kext not loaded, volume UUID is hardcoded
  • No kext loading — HFS, devfs, and all filesystems are compiled into the kernel
  • No ACPI — fake platform expert, hardcoded to 1 CPU
  • Build host — currently requires aarch64-darwin (macOS on Apple Silicon) with Xcode SDK

Building

# Build everything (kernel + ESP + ramdisk)
nix build .#esp

# Build and boot in QEMU
nix run

# Build just the kernel
nix build .#xnu-x86_64

Repositories

Repo Branch Description
darnix nix Nix flake, build scripts, init binary, QEMU runner
xnu nix Patched XNU kernel
hfs nix HFS+ ported to in-kernel build
grub nix GRUB with Mach-O fix + Nix flake

What's next

  • Shell: get toybox running with serial I/O
  • Kext support: rebuild with proper kext loading infrastructure
  • Native x86_64 build: currently cross-compiles, should compile natively too
  • DMG installer: boot from a DMG on real hardware via development kernel

Credit

Legal

Darnix is an independent project and is not affiliated with, endorsed by, or sponsored by Apple Inc. Apple, macOS, and related trademarks are the property of Apple Inc., registered in the U.S. and other countries. Darwin is licensed under the Apple Public Source License (APSL). All other trademarks are the property of their respective owners.