cosmic-term: init at unstable-2023-12-26#276959
cosmic-term: init at unstable-2023-12-26#276959cole-h merged 1 commit intoNixOS:masterfrom ahoneybun:init-cosmic-term
Conversation
There was a problem hiding this comment.
You'll need to add two extra dependencies to LD_LIBRARY_PATH because winit dlopens them on wayland:
| --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]} | |
| --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 wayland libxkbcommon ]} |
BTW, since cosmic-epoch is wayland-only, do we still need to keep X11?
There was a problem hiding this comment.
I agree, X11 should be dropped where possible or XWayland should be used if X11 compatibility is needed 🤔 (I wasn't aware that it was Wayland only)
There was a problem hiding this comment.
It builds without them is there a reason to add them?
The X11 packages will need to stay there to keep it working on Xorg.
There was a problem hiding this comment.
This is the same as cosmic-edit:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/co/cosmic-edit/package.nix#L87
There was a problem hiding this comment.
I agree, X11 should be dropped where possible or XWayland should be used if X11 compatibility is needed 🤔 (I wasn't aware that it was Wayland only)
By wayland only, I mean that there's no X11 session anymore -- the session is wayland only. Xwayland still exists to keep backward compatibility.
It builds without them is there a reason to add them?
It will give a NoWaylandLib error if you unset DISPLAY, since it tries to use dlopen to open the wayland library, which is not existent on NixOS.
To be able to find the library, you'll either to force linking like this:
or wrap with LD_LIBRARY_PATH including wayland.
The X11 packages will need to stay there to keep it working on Xorg.
If you're using cosmic-term with cosmic-session, then there's no reason to keep X11. Although one could argue that they want to use cosmic tools on some other X11 DE, in which case yes the package needs to be kept.
There was a problem hiding this comment.
This is meant to go with cosmic-session so you would have DISPLAY set so I believe it is best to have it set.
EDIT: I see the issue if we don't set that. I figured it is fine since I have it like that with cosmic-edit so I didn't understand the issue to not have it.
There was a problem hiding this comment.
I unset DISPLAY simply to test if it works under wayland. Currently without adding wayland and libxkbcommon to the LD_LIBRARY_PATH it will refuse to run under wayland at all. It's not ideal to have to run through Xwayland for an application that is designed to work in a Wayland-only DE.
There was a problem hiding this comment.
Wayland of cosmic-edit works because it links directly with libwayland-egl instead of opening it via dlopen. That's not true for cosmic-term.
There was a problem hiding this comment.
Updated it and it seems to work on X11/Xorg for me still. Does it have any issues on Wayland?
|
Yes it does. I left it as a draft mainly due to that. |
|
Since #276072 was merged this is now ready for review! |
cole-h
left a comment
There was a problem hiding this comment.
LGTM, builds and runs fine in a not-COSMIC environment.
|
(ofborg build failure is because this branch doesn't have #276072, but checking this branch out and manually rebasing it on |
Description of changes
COSMIC Term is the Terminal Emulator for the COSMIC DE:
https://github.com/pop-os/cosmic-term
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)