Skip to content

fix(cosmic): resolve libcosmic to a single commit - #106

Merged
Muddyblack merged 2 commits into
mainfrom
fix/cosmic-single-libcosmic
Nov 17, 2026
Merged

Muddyblack merged 2 commits into
mainfrom
fix/cosmic-single-libcosmic

Conversation

@Muddyblack

@Muddyblack Muddyblack commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

The COSMIC applet pinned libcosmic by rev, while cosmic-panel-config and cosmic-settings-config follow the libcosmic branch. Cargo.lock therefore held two copies of cosmic-config-1.0.0. Cargo accepts that, but Nix's importCargoLock vendors crates by name-version and fails on the duplicate (ln: failed to create symbolic link …/cosmic-config-1.0.0/…: Permission denied). So packages.<system>.cosmic has never built.

Changes

  • hosts/cosmic/Cargo.toml: drop the libcosmic rev pin.
  • hosts/cosmic/Cargo.lock: cargo update -p libcosmic. Every crate now resolves to libcosmic 12ae9ef.
  • hosts/cosmic/src/main.rs: adapt to the newer API. surface::Action is now generic over the message type and is sent as cosmic::Action::Surface (same as libcosmic's applet example).
  • flake.nix: replace cargoLock + allowBuiltinFetchGit with cargoHash. The builtin fetch cloned libcosmic and its git deps during evaluation on every rebuild. cargoHash vendors everything in one fixed-output fetch that is sandboxed and substitutable, which is the nixpkgs convention. After any Cargo.lock change, set it to pkgs.lib.fakeHash, build, and copy the reported hash.

Testing

  • cargo check in nix develop .#cosmic passes.
  • nix build .#cosmic builds.

The applet pinned libcosmic by rev while cosmic-panel-config and
cosmic-settings-config follow the libcosmic branch, so Cargo.lock held two
copies of cosmic-config-1.0.0. Nix's importCargoLock vendors crates by
name-version and fails on the duplicate ("ln: ... Permission denied").

Drop the rev pin so every crate resolves to the same libcosmic commit, and
adapt to its API: surface::Action is now generic over the message type and
is sent as cosmic::Action::Surface.
github-actions Bot added a commit that referenced this pull request Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

macOS screenshots (d9327b2)

Build and downloadable PNGs · updated with every new commit

View screenshots (3)

desktop-00-sessions.png

desktop-00-sessions.png

desktop-03-settings-providers.png

desktop-03-settings-providers.png

desktop-04-settings-appearance.png

desktop-04-settings-appearance.png

allowBuiltinFetchGit cloned libcosmic and its git deps during evaluation on
every rebuild. cargoHash vendors crates.io and git deps in one fixed-output
fetch, which is sandboxed, substitutable and what nixpkgs expects.
github-actions Bot added a commit that referenced this pull request Nov 17, 2026
@Muddyblack
Muddyblack merged commit 8a0eee4 into main Nov 17, 2026
21 checks passed
@Muddyblack
Muddyblack deleted the fix/cosmic-single-libcosmic branch November 17, 2026 19:35
github-actions Bot added a commit that referenced this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant