feat: simplify devbox config for macOS aarch64
On Apple Silicon Macs, many GTK-related nixpkgs packages are marked as unsupported on aarch64-darwin. Instead of using nixpkgs for the GUI stack, use Homebrew which provides pre-built bottles for gtk4, libadwaita, and all their dependencies (glib, pango, cairo, gdk-pixbuf, graphene, etc.). The devbox config now provides only the Rust toolchain (rustc, cargo, pkg-config, rustfmt) and sets environment variables to locate the Homebrew-installed libraries: - PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig - PKG_CONFIG_PATH_arm64_apple_darwin: /opt/homebrew/lib/pkgconfig - PATH: Includes /opt/homebrew/bin and /opt/homebrew/sbin This allows building the project with: devbox run build All 16 tests pass with: devbox run check Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
0b20b56cba
commit
74ec9a2492
2 changed files with 21 additions and 108 deletions
29
devbox.json
29
devbox.json
|
|
@ -4,30 +4,15 @@
|
|||
"rustc@latest",
|
||||
"cargo@latest",
|
||||
"pkg-config@latest",
|
||||
"rustfmt@latest",
|
||||
"nixpkgs#wayland",
|
||||
"nixpkgs#libxkbcommon",
|
||||
"nixpkgs#mesa",
|
||||
"nixpkgs#libGL",
|
||||
"nixpkgs#vulkan-loader",
|
||||
"nixpkgs#gcc",
|
||||
"nixpkgs#gtk4",
|
||||
"nixpkgs#glib",
|
||||
"nixpkgs#pango",
|
||||
"nixpkgs#cairo",
|
||||
"nixpkgs#graphene",
|
||||
"nixpkgs#gdk-pixbuf",
|
||||
"nixpkgs#harfbuzz",
|
||||
"nixpkgs#libadwaita",
|
||||
"nixpkgs#adwaita-icon-theme",
|
||||
"nixpkgs#flatpak",
|
||||
"nixpkgs#flatpak-builder",
|
||||
"nixpkgs#appstream"
|
||||
"rustfmt@latest"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:$PATH",
|
||||
"PKG_CONFIG_PATH": "/opt/homebrew/lib/pkgconfig",
|
||||
"PKG_CONFIG_PATH_arm64_apple_darwin": "/opt/homebrew/lib/pkgconfig"
|
||||
},
|
||||
"shell": {
|
||||
"init_hook": [
|
||||
". \"$PWD/scripts/devbox-libs.sh\""
|
||||
],
|
||||
"init_hook": [],
|
||||
"scripts": {
|
||||
"build": [
|
||||
"cargo build --release"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue