@@ -37,6 +37,18 @@ The build produced does have some limitations:
3737## Requirements
3838
3939- [ Xcode] ( https://apps.apple.com/gb/app/xcode/id497799835?mt=12 )
40+
41+ # Nix
42+
43+ The [ Nix] ( https://nixos.org/ ) package manager is the preferred and most reliable
44+ way to install all dependencies required to build Emacs. Alternatively you can
45+ also use Homebrew.
46+
47+ ### Homebrew
48+
49+ If you do not have Nix installed, then the alternative way to manage and install
50+ all dependencies is via Homebrew.
51+
4052- [ Homebrew] ( https://brew.sh/ )
4153- Ruby 2.3.0 or later is needed to execute the build script itself. macOS comes
4254 with Ruby, check your version with ` ruby --version ` . If it's too old, you can
@@ -71,32 +83,53 @@ Nightly builds are built with GitHub Actions on GitHub-hosted runners, using
7183
7284## Usage
7385
86+ ### Nix
87+
88+ Ensure [ Flakes] ( https://nixos.wiki/wiki/Flakes ) are enabled, and enter the flake
89+ development environment with ` nix develop ` . Within this environment, you can
90+ execute the ` ./build-emacs-for-macos --help ` to get started.
91+
92+ ### Homebrew
93+
94+ Run ` make boostrap ` to ensure all Ruby and Homebrew dependencies are installed.
95+
96+ ### Build Script
97+
7498```
7599Usage: ./build-emacs-for-macos [options] <branch/tag/sha>
76100
77101Branch, tag, and SHA are from the emacs-mirror/emacs/emacs Github repo,
78102available here: https://github.com/emacs-mirror/emacs
79103
80104Options:
81- -j, --parallel COUNT Compile using COUNT parallel processes (detected: 8)
105+ --info Print environment info and detected library paths, then exit
106+ --preview Print preview details about build and exit.
107+ -j, --parallel COUNT Compile using COUNT parallel processes (detected: 16)
82108 --git-sha SHA Override detected git SHA of specified branch allowing builds of old commits
109+ --[no-]use-nix Use Nix instead of Homebrew to find dependencies (default: enabled if EMACS_BUILD_USE_NIX is set to truthy value)
83110 --[no-]xwidgets Enable/disable XWidgets if supported (default: enabled)
111+ --[no-]tree-sitter Enable/disable tree-sitter if supported(default: enabled)
84112 --[no-]native-comp Enable/disable native-comp (default: enabled if supported)
85113 --[no-]native-march Enable/disable -march=native CFLAG(default: disabled)
86114 --[no-]native-full-aot Enable/disable NATIVE_FULL_AOT / Ahead of Time compilation (default: disabled)
87115 --[no-]relink-eln-files Enable/disable re-linking shared libraries in bundled *.eln files (default: enabled)
88116 --[no-]rsvg Enable/disable SVG image support via librsvg (default: enabled)
117+ --[no-]dbus Enable/disable dbus support (default: enabled)
89118 --no-titlebar Apply no-titlebar patch (default: disabled)
90- --posix-spawn Apply posix-spawn patch (default: disabled )
119+ --posix-spawn Apply posix-spawn patch (deprecated )
91120 --no-frame-refocus Apply no-frame-refocus patch (default: disabled)
121+ --[no-]poll Apply poll patch (deprecated)
122+ --github-src-repo REPO Specify a GitHub repo to download source tarballs from (default: emacs-mirror/emacs)
92123 --[no-]github-auth Make authenticated GitHub API requests if GITHUB_TOKEN environment variable is set.(default: enabled)
93124 --work-dir DIR Specify a working directory where tarballs, sources, and builds will be stored and worked with
94125 -o, --output DIR Output directory for finished builds (default: <work-dir>/builds)
95126 --build-name NAME Override generated build name
96127 --dist-include x,y,z List of extra files to copy from Emacs source into build folder/archive (default: COPYING)
128+ --[no-]self-sign Enable/disable self-signing of Emacs.app (default: enabled)
97129 --[no-]archive Enable/disable creating *.tbz archive (default: enabled)
98130 --[no-]archive-keep-build-dir
99131 Enable/disable keeping source folder for archive (default: disabled)
132+ --log-level LEVEL Build script log level (default: info)
100133 --plan FILE Follow given plan file, instead of using given git ref/sha
101134```
102135
0 commit comments