New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emacs: allow X and cli-only builds on Darwin #45988
Conversation
58674ee
to
d871163
Compare
++ lib.optionals withX
[ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
- imagemagick gconf m17n_lib libotf ]
+ imagemagick gconf ]
+ ++ lib.optionals (stdenv.isLinux && withX) [ m17n_lib libotf ]
++ lib.optional (withX && withGTK2) gtk2
++ lib.optionals (withX && withGTK3) [ gtk3 gsettings-desktop-schemas ]
This looks strange to me. Can you build withX on Darwin?
Also /cc @matthewbauer
|
Yep x11 can work on macOS. I think it isn’t used much but might be useful for things like xwidgets and stuff. |
d871163
to
b899880
Compare
After reading your comments, I had another look at the gtk2/gtk3 support in emacs. It seems like if building against gtk, it must be X11 gtk. I've pushed an updated version of the patch to use |
b899880
to
2e196a4
Compare
2e196a4
to
bbf37b8
Compare
What's the cause of the |
I think it just calls anything that’s not a new package a clean up. |
@GrahamcOfBorg build emacs |
Success on x86_64-darwin (full log) Attempted: emacs Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: emacs Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: emacs Partial log (click to expand)
|
Motivation for this change
It's possible to configure Emacs on Darwin to build as CLI-only, with lucid, or with Cocoa. Nixpkgs currently does not allow this configuration, and always forces building with Cocoa.
Based on the assertions, building with GTK2 and GTK3 (without X11?) is supported on macOS, but the
buildInputs
value doesn't seem to match this, and only provides gtk ifwithX = true
. As is, trying to build withwithX = true; withGTK2 = true;
orwithX = true; withGTK3 = true;
does not succeed.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)