NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.95k stars 13.96k forks source link

Emacs with withPgtk does not have GUI #192692

Closed accelbread closed 2 years ago

accelbread commented 2 years ago

Describe the bug

When built with withPgtk = true;, emacs does not use the pgtk GUI. When launched from a terminal, Emacs launches in TUI instead of with the pgtk GUI. Launching emacs from the application drawer fails.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install pkgs.emacs.override{ withPgtk = true; }; using emacs package from nixos-unstable
  2. Launch emacs

Expected behavior

Emacs should launch in GUI mode with pgtk.

Additional context

I tried building with withX enabled as well but this causes nixios-rebuild to error with assert withPgtk -> withGTK3 && !withX && gtk3 != null;

Notify maintainers

@lovek323 @jwiegley @adisbladis

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.14-zen1, NixOS, 22.05 (Quokka), 22.05.20220921.9bdbbaa`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
adisbladis commented 2 years ago

pgtk is not in a stable release yet. this option exists for the overlay packages. you will have to wait for release 29.

srid commented 1 year ago

This is how I build Emacs nightly with pgtk/xwidgets:

https://github.com/srid/nixos-config/blob/master/home/emacs.nix#L11-L17