Skip to content

libcosmicAppHook: init#380312

Merged
GaetanLepage merged 1 commit intoNixOS:masterfrom
thefossguy:fix-cosmic-init-libcosmic
Feb 13, 2025
Merged

libcosmicAppHook: init#380312
GaetanLepage merged 1 commit intoNixOS:masterfrom
thefossguy:fix-cosmic-init-libcosmic

Conversation

@thefossguy
Copy link
Copy Markdown
Member

Part of #369113
cc: @nyabinary

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners bot requested a review from Ericson2314 February 8, 2025 10:44
@thefossguy thefossguy force-pushed the fix-cosmic-init-libcosmic branch from 12ae6e5 to e8a2c99 Compare February 8, 2025 10:45
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 8, 2025
@thefossguy thefossguy force-pushed the fix-cosmic-init-libcosmic branch from e8a2c99 to a115efa Compare February 8, 2025 13:23
@HeitorAugustoLN
Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380312


x86_64-linux

✅ 1 package built:
  • libcosmicAppHook

Copy link
Copy Markdown
Member

@HeitorAugustoLN HeitorAugustoLN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Also built cosmic-idle package with this hook and it worked as expected.

@nyabinary
Copy link
Copy Markdown
Contributor

Maybe all the cosmic-* packages should be updated to use this hook in this pr or should that be a separate PR?

@HeitorAugustoLN
Copy link
Copy Markdown
Member

Maybe all the cosmic-* packages should be updated to use this hook in this pr or should that be a separate PR?

I prefer it in a separate PR, I am planning to do it after this PR is merged.

@Ericson2314
Copy link
Copy Markdown
Member

tbh I don't really get the point of this setup hook because it is unclear what the relevant interface of a "libcosmic app" is. This just looks like a bunch of miscellaneous Cargo stuff that isn't really specific to libcosmic.

@HeitorAugustoLN
Copy link
Copy Markdown
Member

HeitorAugustoLN commented Feb 8, 2025

tbh I don't really get the point of this setup hook because it is unclear what the relevant interface of a "libcosmic app" is. This just looks like a bunch of miscellaneous Cargo stuff that isn't really specific to libcosmic.

It mostly does some boilerplate required for every libcosmic application, that is mostly wrapping the binary to with dependencies:
https://github.com/NixOS/nixpkgs/blob/38fa1a528eee73108e8631ed2ed3743fe87870f3/pkgs/by-name/co/cosmic-ext-tweaks/package.nix#L63-L65

https://github.com/NixOS/nixpkgs/blob/38fa1a528eee73108e8631ed2ed3743fe87870f3/pkgs/by-name/co/cosmic-ext-tweaks/package.nix#L40-L47

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Feb 9, 2025
@thefossguy
Copy link
Copy Markdown
Member Author

@Ericson2314 This is mostly a wrapper for software that uses the libcosmic library where we are adding a "wrapper" (not really) for X11 and Wayland libraries without duplicating it in the package.nix/default.nix and maybe risk missing some core library.

@HeitorAugustoLN I have the code that uses this apphook ready. Just waiting for this PR to merge. :)

@Ericson2314
Copy link
Copy Markdown
Member

Ericson2314 commented Feb 9, 2025

Ah is the problem that since we're talking buildRustPackage not buildRustCrate, we need to apply again and again what is conceptually a single bunch of override for a single library?

In that case, carry on :)

@thefossguy
Copy link
Copy Markdown
Member Author

Exactly, yes.

Copy link
Copy Markdown
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits. Otherwise LGTM.

@thefossguy thefossguy force-pushed the fix-cosmic-init-libcosmic branch from 788b3f4 to 239a2d7 Compare February 13, 2025 13:23
@thefossguy thefossguy force-pushed the fix-cosmic-init-libcosmic branch from 239a2d7 to 5f411a7 Compare February 13, 2025 13:45
Copy link
Copy Markdown
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Also, I know that this hook has been used downstream in nixos-cosmic. Hence, I am fairly confident merging this.

@GaetanLepage GaetanLepage requested a review from drupol February 13, 2025 13:46
@thefossguy
Copy link
Copy Markdown
Member Author

Yes, it originates from nixos-cosmic and I've addressed the authorship in the very beginning of both files. :)

Copy link
Copy Markdown
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM, but I haven't tested.

@thefossguy
Copy link
Copy Markdown
Member Author

Nothing to test at the moment, it's a setup hook. I will follow up with more PRs in the cosmic-* packages to use the libcosmicAppHook once this PR is merged.

@GaetanLepage GaetanLepage merged commit 6b29714 into NixOS:master Feb 13, 2025
@nyabinary
Copy link
Copy Markdown
Contributor

Nothing to test at the moment, it's a setup hook. I will follow up with more PRs in the cosmic-* packages to use the libcosmicAppHook once this PR is merged.

Any plans for the module portion of it as well?

@GaetanLepage
Copy link
Copy Markdown
Contributor

Nothing to test at the moment, it's a setup hook. I will follow up with more PRs in the cosmic-* packages to use the libcosmicAppHook once this PR is merged.

Any plans for the module portion of it as well?

Maybe we should wait for the beta to be released?
Things are still very unstable for now... It might not be a good idea to ship it in nixpkgs. This is nothing more than my opinion.

@nyabinary
Copy link
Copy Markdown
Contributor

Nothing to test at the moment, it's a setup hook. I will follow up with more PRs in the cosmic-* packages to use the libcosmicAppHook once this PR is merged.

Any plans for the module portion of it as well?

Maybe we should wait for the beta to be released? Things are still very unstable for now... It might not be a good idea to ship it in nixpkgs. This is nothing more than my opinion.

I don't see why we should stop a module, the packages are already here, maybe we can add a disclaimer in the module description that says it's experimental?

@GaetanLepage
Copy link
Copy Markdown
Contributor

I don't see why we should stop a module, the packages are already here, maybe we can add a disclaimer in the module description that says it's experimental?

I was not saying this for the users, but also, and mostly, for the maintenance.
Deprecating/renaming options can be a little cumbersome.

Having said that, I would have absolutely no objection in merging a PR adding the cosmic module(s).

@thefossguy
Copy link
Copy Markdown
Member Author

thefossguy commented Feb 20, 2025

Nothing to test at the moment, it's a setup hook. I will follow up with more PRs in the cosmic-* packages to use the libcosmicAppHook once this PR is merged.

Any plans for the module portion of it as well?

Yes, I'll reuse the bits (and feedback) from #369113. A bit occupied by work, should send it by the end of this week.

Edit: I plan to upstream just a basic module that simply allows you to enable the greeter + DE and not much else so that should be good enough for testing the state of packages too.

@a-kenji
Copy link
Copy Markdown
Member

a-kenji commented Feb 24, 2025

I suggest before adding this hook to cosmic-* packages to write documentation for it in the nixpkgs manual.

@HeitorAugustoLN
Copy link
Copy Markdown
Member

I suggest before adding this hook to cosmic-* packages to write documentation for it in the nixpkgs manual.

I added documentation in #386400, as suggested by @a-kenji, can anyone else take a look at it?

@a-kenji
Copy link
Copy Markdown
Member

a-kenji commented Mar 2, 2025

Ideally it would be @thefossguy, since they created the PR in the first place.

@wrenix wrenix mentioned this pull request Mar 17, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants