Repository navigation
fix(cosmic): resolve libcosmic to a single commit - #106
Merged
Merged
Conversation
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.
Contributor
macOS screenshots (d9327b2)Build and downloadable PNGs · updated with every new commit |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The COSMIC applet pinned libcosmic by
rev, whilecosmic-panel-configandcosmic-settings-configfollow the libcosmic branch.Cargo.locktherefore held two copies ofcosmic-config-1.0.0. Cargo accepts that, but Nix'simportCargoLockvendors crates byname-versionand fails on the duplicate (ln: failed to create symbolic link …/cosmic-config-1.0.0/…: Permission denied). Sopackages.<system>.cosmichas never built.Changes
hosts/cosmic/Cargo.toml: drop the libcosmicrevpin.hosts/cosmic/Cargo.lock:cargo update -p libcosmic. Every crate now resolves to libcosmic12ae9ef.hosts/cosmic/src/main.rs: adapt to the newer API.surface::Actionis now generic over the message type and is sent ascosmic::Action::Surface(same as libcosmic's applet example).flake.nix: replacecargoLock+allowBuiltinFetchGitwithcargoHash. The builtin fetch cloned libcosmic and its git deps during evaluation on every rebuild.cargoHashvendors everything in one fixed-output fetch that is sandboxed and substitutable, which is the nixpkgs convention. After anyCargo.lockchange, set it topkgs.lib.fakeHash, build, and copy the reported hash.Testing
cargo checkinnix develop .#cosmicpasses.nix build .#cosmicbuilds.