Skip to content
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

Merged
merged 1 commit into from Sep 10, 2018

Conversation

thefloweringash
Copy link
Member

@thefloweringash thefloweringash commented Sep 3, 2018

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 if withX = true. As is, trying to build with withX = true; withGTK2 = true; or withX = true; withGTK3 = true; does not succeed.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@oxij
Copy link
Member

oxij commented Sep 9, 2018 via email

@matthewbauer
Copy link
Member

Yep x11 can work on macOS. I think it isn’t used much but might be useful for things like xwidgets and stuff.

@thefloweringash
Copy link
Member Author

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 gtk2-x11 instead of gtk2 and gtk3-x11 instead of gtk3, and now all configurations build and run on macOS.

@thefloweringash
Copy link
Member Author

What's the cause of the has: clean-up label?

@matthewbauer
Copy link
Member

I think it just calls anything that’s not a new package a clean up.

@matthewbauer
Copy link
Member

@GrahamcOfBorg build emacs

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: emacs

Partial log (click to expand)

these paths will be fetched (44.23 MiB download, 146.18 MiB unpacked):
  /nix/store/1y30l3jnr6rd0l78x3jmmpns0r05l6yb-apple-framework-GSS
  /nix/store/6ij4vgw7macqcbjss1py68xwmyghawh2-emacs-26.1
copying path '/nix/store/1y30l3jnr6rd0l78x3jmmpns0r05l6yb-apple-framework-GSS' from 'https://cache.nixos.org'...
copying path '/nix/store/6ij4vgw7macqcbjss1py68xwmyghawh2-emacs-26.1' from 'https://cache.nixos.org'...
/nix/store/6ij4vgw7macqcbjss1py68xwmyghawh2-emacs-26.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: emacs

Partial log (click to expand)

  /nix/store/fwi01pbhbk7fr4jjzv2hlsbdf9cw40fj-libXpm-3.5.12
  /nix/store/g5ccasdcpzizpbi671hzdsc7sq9k4jda-m17n-lib-1.8.0
copying path '/nix/store/fwi01pbhbk7fr4jjzv2hlsbdf9cw40fj-libXpm-3.5.12' from 'https://cache.nixos.org'...
copying path '/nix/store/5rsavwl32z1rm148v1h63b1ic6m2ck75-libungif-4.1.4' from 'https://cache.nixos.org'...
copying path '/nix/store/fvfbd2mg5lmi88v19bbnfia45nb7pcw8-m17n-db-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/g5ccasdcpzizpbi671hzdsc7sq9k4jda-m17n-lib-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/948cys869pqhdxar0wh0pljxgph1rwjq-libXaw-1.0.13' from 'https://cache.nixos.org'...
copying path '/nix/store/a4bfkidl5ay7yr0pdxkcvmnm6lkpybpq-libotf-0.9.16' from 'https://cache.nixos.org'...
copying path '/nix/store/2nyqz2d6n93ird83rf5l5zrrjmx02whq-emacs-26.1' from 'https://cache.nixos.org'...
/nix/store/2nyqz2d6n93ird83rf5l5zrrjmx02whq-emacs-26.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: emacs

Partial log (click to expand)

these paths will be fetched (42.42 MiB download, 151.52 MiB unpacked):
  /nix/store/5fw4i92cq8zdfvxcb04882pyvhpb9cfj-emacs-26.1
  /nix/store/llk4irv6aajfd2hgn3ss3np9dn4wsb0j-m17n-lib-1.8.0
  /nix/store/qg8rjxc6kldzv2fc1rsjb982ycwls1bn-libotf-0.9.16
  /nix/store/xfpfpzxw4nldpy2vp165p28xa06g2c9w-m17n-db-1.8.0
copying path '/nix/store/qg8rjxc6kldzv2fc1rsjb982ycwls1bn-libotf-0.9.16' from 'https://cache.nixos.org'...
copying path '/nix/store/xfpfpzxw4nldpy2vp165p28xa06g2c9w-m17n-db-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/llk4irv6aajfd2hgn3ss3np9dn4wsb0j-m17n-lib-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/5fw4i92cq8zdfvxcb04882pyvhpb9cfj-emacs-26.1' from 'https://cache.nixos.org'...
/nix/store/5fw4i92cq8zdfvxcb04882pyvhpb9cfj-emacs-26.1

@matthewbauer matthewbauer merged commit f45fe1f into NixOS:master Sep 10, 2018
@thefloweringash thefloweringash deleted the emacs-darwin-cli branch September 24, 2018 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants