Skip to content

fix(nix): resolve missing Cargo.toml and Cargo.lock by using upstream niri flake overlay - #26

Merged
Chintanpatel24 merged 2 commits into
mainfrom
fix-nix-flake-overlay
Sep 19, 2026
Merged

Chintanpatel24 merged 2 commits into
mainfrom
fix-nix-flake-overlay

Conversation

@Chintanpatel24

Copy link
Copy Markdown
Member

Summary

Fixes #25

Problem

Lniri was refactored into a pure overlay repository, keeping only modified files under src/ and resources/. However, flake.nix still attempted to build using local paths to ./Cargo.toml and ./Cargo.lock (which were removed from this repo), causing nix build to fail with:

error: path '.../Cargo.lock' does not exist

Solution

  • Configured upstream Niri (github:niri-wm/niri/v26.04) as a flake input with inputs.nixpkgs.follows = "nixpkgs".
  • Applied Lniri's liquid glass and kwin-glass overlay files (src/render_helpers/, niri-config/src/appearance.rs, src/layer/mapped.rs, etc.) directly onto the unpacked upstream source via overrideAttrs in postPatch.
  • Updated postInstall to provide both lniri and Lniri symlinks alongside niri, generate shell completions for lniri, and install desktop entry, portal configuration, session launcher, and systemd units with properly patched binary paths.
  • Updated flake.lock with locked inputs for niri, nixpkgs, and rust-overlay.
  • Verified evaluation across supported systems with nix flake show and nix eval.

Copilot AI lite review requested due to automatic review settings September 19, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Chintanpatel24
Chintanpatel24 merged commit 9b09da0 into main Sep 19, 2026
1 check passed
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.

[Bug]: Nix package build failure

2 participants