-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
cosmic-term: init at unstable-2023-12-26 #276959
Conversation
postInstall = '' | ||
wrapProgram "$out/bin/${pname}" \ | ||
--suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \ | ||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it and it seems to work on X11/Xorg for me still. Does it have any issues on Wayland?
80c70b0
to
81e068e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think this depends on #276072?
Yes it does. I left it as a draft mainly due to that. |
Since #276072 was merged this is now ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)