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

Package request: (Pop!_OS) COSMIC Epoch Desktop Environment #199563

Closed
KiaraGrouwstra opened this issue Nov 4, 2022 · 18 comments
Closed

Package request: (Pop!_OS) COSMIC Epoch Desktop Environment #199563

KiaraGrouwstra opened this issue Nov 4, 2022 · 18 comments
Labels
0.kind: packaging request Request for a new package to be added

Comments

@KiaraGrouwstra
Copy link
Contributor

Project description
COSMIC is a Rust-based desktop environment by System76 created for their distro Pop!_OS, consisting of a set of packages.

Metadata

note there has been an earlier effort over at #144411, though that PR was abandoned.
that PR erroneously stated it corresponded to request #92769, though that request had a smaller scope, that has since been addressed.

@KiaraGrouwstra KiaraGrouwstra added the 0.kind: packaging request Request for a new package to be added label Nov 4, 2022
@eliasboegel
Copy link

My understanding is that this is the over-arching repo for the coming "from scratch" COSMIC DE: https://github.com/pop-os/cosmic-epoch

@wsx-udscbt
Copy link

Hi, I just turned every components in https://github.com/pop-os/cosmic-epoch into flakes (see for example pop-os/cosmic-comp#53) and hopefully this can be a first step in integrating the new COSMIC environment.
Currently all the components are Rust projects and hence I use crane in the flakes to package them.
I'm not sure if this adheres to the Rust packaging practices in nixpkgs, but maybe can be used as a starting point.
Also, much more work needs to be done on combining all the packaged components and nicely integrating the entire COSMIC environment into NixOS (a NixOS module or home-manager module?)

I am pretty new to all of those, and it would be great if someone more experienced can help with this effort.
Thank you!

@colemickens
Copy link
Member

I was going to open an issue on cosmic-epoch, but might as well comment here.

Have you looked into this more, @wsx-udscbt ? I have an idea, but not enough time:

  • add an aggregating flake.nix to cosmic-epoch
  • use Hyprland as inspiration and add nixos+home-manager modules to cosmic-epoch

I haven't looked at the individual components, but if the individual components do a decent job of installing systemd units, the modules could wind up being fairly simple.

@wsx-udscbt
Copy link

I haven't got much progress yet, but thanks for the ideas!
Currently for individual components only the binary is built, and there are systemd unit files and desktop icons in the upstream repos that are not yet copied to the output.
As you suggested, the immediate next step is to also package those artifacts together into each components.

@KiaraGrouwstra KiaraGrouwstra changed the title Package request: (Pop!_OS) COSMIC Desktop Environment Package request: (Pop!_OS) COSMIC Epoch Desktop Environment Feb 23, 2023
@soloturn
Copy link

soloturn commented Apr 22, 2023

@wsx-udscbt would you mind putting nix files in nix repositories, instead of upstream? there are one million linux flavours, and putting the files in upstream repositories is a maintenance nightmare. one example: cosmic epoch does not require meson any more. the nix files still refer to meson as nobody knows how to deal with nix files, and you as well have no time to maintain them.

@wsx-udscbt
Copy link

@wsx-udscbt would you mind putting nix files in nix repositories, instead of upstream?

Having the nix flakes upstream not only helps with packaging, but also helps with setting up a quick development environment for Nix users to hack on the project. The cosmic-comp repo also has a CI running with the Nix flakes.
Additionally, I believe the way I packaged cosmic (by using crane) is not the preferred way for Rust packages in nixpkgs, and moving them directly here may get rejected.

cosmic epoch does not require meson any more. the nix files still refer to meson as nobody knows how to deal with nix files, and you as well have no time to maintain them.

Thanks for pointing out the issue, and I do notice some changes in the build process of cosmic epoch sub-repos leading to unsuccessful builds.
But I think the best way to address this is to fix the Nix flakes upstream, and setup CI in more repos to monitor the build status better.
Admittedly I don't have much time around, but I'll try to address this in the future.

@MtFBella109
Copy link

I tried to install it to, but I failed by the cosmic-applibrary. It complains everytime about that the environment Variable isn't set and I don't know how to fix that and second I sea that in NixOS Packages there is a Package with the Name rPackages.COSMIC_67, But I don't know which package this is, if it is the cosmic-epoch or the cosmic package or the old cosmic-desktop I don't know

@byrongibson
Copy link

I tried to install it to, but I failed by the cosmic-applibrary. It complains everytime about that the environment Variable isn't set and I don't know how to fix that and second I sea that in NixOS Packages there is a Package with the Name rPackages.COSMIC_67, But I don't know which package this is, if it is the cosmic-epoch or the cosmic package or the old cosmic-desktop I don't know

rPackages are for the R statistical programming language, not related to the Cosmic desktop.

@MtFBella109
Copy link

I tried to build the cosmic-settings package. But everytime I get the following Error: error: builder for '/nix/store/c3bzrzvxqpkdr4mgasqn6ngwpfzdswhg-cargo-package-0.0.1.drv' failed with exit code 101;
last 10 log lines:
> --> app/src/app.rs:13:45
> |
> 13 | event::wayland::{self, WindowEvent, WindowState},
> | ^^^^^^^^^^^ no WindowState in event::wayland
> |
> = help: consider importing this variant instead:
> crate::Message::WindowState
>
> For more information about this error, try rustc --explain E0432.
> error: could not compile cosmic-settings (bin "cosmic-settings") due to previous error
For full logs, run 'nix log /nix/store/c3bzrzvxqpkdr4mgasqn6ngwpfzdswhg-cargo-package-0.0.1.drv'.

And this is the flake.nix I used: https://pastebin.com/62xfL0xW. I'm not exactly sure if it's an Error with the flake or really an Error with Rust

@nyabinary
Copy link
Contributor

Is there any progress whatsoever on this, COSMIC is getting more mature.

@MtFBella109
Copy link

I think it‘s not in the repos of Nix, but if you look on the cosmic-epoch repo and then look into every git submodule you can see in all of it a flake.nix, so you can actually install everything with the flakes, the last time I tested to install it the Installation worked completely

@lobre
Copy link
Contributor

lobre commented Aug 22, 2023

This is a good news, however, I am not sure how feasible this is, but it would be handy to have cosmic packaged in Nixos the same way as other desktop environments.

@MtFBella109
Copy link

Yeah I guess that cosmic epoch get in the Nix packages, when it is stable and not in a Alpha, but with the flakes it is possible to install it, which is very good

@alyssais
Copy link
Member

#251365

alyssais added a commit to alyssais/nixpkgs that referenced this issue Aug 25, 2023
alyssais added a commit to alyssais/nixpkgs that referenced this issue Aug 25, 2023
alyssais added a commit to alyssais/nixpkgs that referenced this issue Aug 25, 2023
alyssais added a commit to alyssais/nixpkgs that referenced this issue Oct 5, 2023
alyssais added a commit to alyssais/nixpkgs that referenced this issue Oct 5, 2023
alyssais added a commit to alyssais/nixpkgs that referenced this issue Oct 5, 2023
alyssais added a commit that referenced this issue Oct 7, 2023
alyssais added a commit that referenced this issue Oct 7, 2023
alyssais added a commit that referenced this issue Oct 7, 2023
@MtFBella109
Copy link

cosmic-comp doesn't start for me at all, If I try to run it from tty, It can't read a few Configs, it is "xbg-config", "input-default", "input-touchpad" & "input-device", it says for all 4 of them, no such file or directory

@MtFBella109
Copy link

Okay, forgot to execute it with sudo, but If I do that, I get the following Error: 2023-11-12T16:18:56.898673Z ERROR panic: thread 'main' panicked at 'called Result::unwrap()on anErr value: RuntimeDirNotSet': src/main.rs:96 0: <backtrace::capture::Backtrace as core::default::Default>::default 1: log_panics::Config::install_panic_hook::{{closure}} 2: std::panicking::rust_panic_with_hook 3: std::panicking::begin_panic_handler::{{closure}} 4: std::sys_common::backtrace::__rust_end_short_backtrace 5: rust_begin_unwind 6: core::panicking::panic_fmt 7: core::result::unwrap_failed 8: cosmic_comp::main 9: std::sys_common::backtrace::__rust_begin_short_backtrace 10: main 11: __libc_start_call_main 12: __libc_start_main_impl 13: _start

@wash2
Copy link

wash2 commented Nov 12, 2023

Okay, forgot to execute it with sudo, but If I do that, I get the following Error: 2023-11-12T16:18:56.898673Z ERROR panic: thread 'main' panicked at 'called Result::unwrap()on anErr value: RuntimeDirNotSet': src/main.rs:96 0: <backtrace::capture::Backtrace as core::default::Default>::default 1: log_panics::Config::install_panic_hook::{{closure}} 2: std::panicking::rust_panic_with_hook 3: std::panicking::begin_panic_handler::{{closure}} 4: std::sys_common::backtrace::__rust_end_short_backtrace 5: rust_begin_unwind 6: core::panicking::panic_fmt 7: core::result::unwrap_failed 8: cosmic_comp::main 9: std::sys_common::backtrace::__rust_begin_short_backtrace 10: main 11: __libc_start_call_main 12: __libc_start_main_impl 13: _start

Maybe try setting XDG_RUNTIME_DIR. That is where cosmic-comp is going to put the wayland-1 socket for clients to connect.

@ahoneybun
Copy link
Contributor

I feel like we can close this PR for this one?:

#259641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

No branches or pull requests