cmacrae / emacs

Nightly custom Emacs builds for macOS Nix environments
MIT License
40 stars 17 forks source link

Can install from flake/registry, cannot build/incorporate from flake/overlay #17

Open jonathanwilner opened 8 months ago

jonathanwilner commented 8 months ago

Hi,

I love this version of Emacs for MacOS - both the Yabai window patch + the support for term are lifesavers.

I cannot figure out how to use the flake in my config directly to become either the pkgs.emacs or pkgs.emacs-unstable replacement. I've tried via an overlay as well as via incorporating the flake directly.

If I install via nix registry, nix profile, it works fine.

If I try to install via the overlay / flake approach, I get an error attempting to build mesa for some reason.

`error: builder for '/nix/store/4fns3gy97k9fj6ya8rifgvw7l4xmafyq-mesa-23.1.7.drv' failed with exit code 1; last 10 log lines:

C compiler for the host machine: clang (clang 11.1.0 "clang version 11.1.0") C linker for the host machine: clang ld64 609 C++ compiler for the host machine: clang++ (clang 11.1.0 "clang version 11.1.0") C++ linker for the host machine: clang++ ld64 609 Host machine cpu family: aarch64 Host machine cpu: aarch64

meson.build:364:3: ERROR: Feature gbm cannot be enabled: GBM only supports DRM/KMS platforms

A full log can be found at /private/tmp/nix-build-mesa-23.1.7.drv-0/mesa-23.1.7/build/meson-logs/meson-log.txt For full logs, run 'nix log /nix/store/4fns3gy97k9fj6ya8rifgvw7l4xmafyq-mesa-23.1.7.drv'.`

I am sure this is user error for me being less proficient at nix. I'd love help or a pointer in the right direction to make the flake/overlay approach work well.

Thanks!

jonathanwilner commented 8 months ago

The answer is bringing in XWidgets or GTK3. Either seems to bring in Mesa if attempting to compile from the flake. Additionally, native-comp as constructed in this flake doesn't work on M1/M2, so removing that takes out the noise from Emacs error log.

There appear to be paths to solve Mesa with overlays, possible the same with native-comp. I was just happy to the overlay/flake working at all for now.