Skip to content

fix: nix evaluation warnings + flake improvements#395

Merged
feschber merged 6 commits intofeschber:mainfrom
onelocked:main
Mar 24, 2026
Merged

fix: nix evaluation warnings + flake improvements#395
feschber merged 6 commits intofeschber:mainfrom
onelocked:main

Conversation

@onelocked
Copy link
Contributor

@onelocked onelocked commented Mar 9, 2026

Hey I am using the flake and home manager module.
I started getting these evaluation warnings, so I decided to look into it.

evaluation warning: The xorg package set has been deprecated, 'xorg.libX11' has been renamed to 'libx11'
evaluation warning: The xorg package set has been deprecated, 'xorg.libXtst' has been renamed to 'libxtst'

Main change
I've renamed xorg.libX11 and xorg.libXtst to libX11 and libXtst respectively, to fix the evaluation warning

Additional changes:

    wrapProgram "$out/bin/lan-mouse" \
      --set GDK_PIXBUF_MODULE_FILE ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

Was dropped in favor of wrapGAppsHook4, which does it automatically.

I have also removed with pkgs; and instead list dependencies explicitly in the argument set, this aligns with how nixpkgs does it.

Side notes/Questions
I am not entirely sure if buildPackages.gtk4 cmake are required. I've kept them since they were here already.
I've tried building lan-mouse without them and it does build and it works, but I've only tested it on my x86_64-linux machine.

@onelocked onelocked marked this pull request as draft March 9, 2026 21:19
@onelocked
Copy link
Contributor Author

The evaluation warning is only on the latest nixos-unstable, the flake.lock in this repo hasn't been updated in a while, so it won't get this issue. I marked it as draft for now, could revive this PR when you decide to update the flake.lock

@onelocked
Copy link
Contributor Author

Decided to give flake.nix a slight revamp whilst I was at it. The new improved flake now uses the rust overlay for both the devshell and package build.
The rust-analyzer now comes from the rust overlay, instead of using the unwrapped nixpkgs version.

It should be slightly easier to maintain, and I will gladly help maintain it, as I use lan-mouse daily in my workflow.

@onelocked onelocked changed the title fix: nix evaluation warning fix: nix evaluation warnings + flake improvements Mar 10, 2026
@onelocked onelocked marked this pull request as ready for review March 10, 2026 01:53
@onelocked
Copy link
Contributor Author

I've removed the references to apple sdk, this should hopefully resolve the build issues on macos.
This is from the nixpkgs docs

You may see references to `darwin.apple_sdk.frameworks`.
This is the legacy SDK pattern, and it is being phased out.
All packages in `darwin.apple_sdk`, `darwin.apple_sdk_11_0`, and `darwin.apple_sdk_12_3` have been removed.
If your derivation references them, you should delete those references, as the default SDK should be enough to build your package.

To read more: https://github.com/NixOS/nixpkgs/blob/5e88cffa9881d4d311df973400dd4018ada212b0/doc/stdenv/platform-notes.chapter.md?plain=1#L261

@feschber
Copy link
Owner

I am not entirely sure if buildPackages.gtk4 cmake are required. I've kept them since they were here already.
I've tried building lan-mouse without them and it does build and it works, but I've only tested it on my x86_64-linux machine.

Not entirely sure about this either. @ICE-GB do you remember why it's there?

@feschber
Copy link
Owner

The evaluation warning is only on the latest nixos-unstable, the flake.lock in this repo hasn't been updated in a while, so it won't get this issue. I marked it as draft for now, could revive this PR when you decide to update the flake.lock

feel free to update the flake.

@onelocked
Copy link
Contributor Author

feel free to update the flake.

Perfect, the updated flake.lock is already pushed, the checks have passed, let me know if there is anything else needed.

@ICE-GB
Copy link
Contributor

ICE-GB commented Mar 13, 2026

I am not entirely sure if buildPackages.gtk4 cmake are required. I've kept them since they were here already.
I've tried building lan-mouse without them and it does build and it works, but I've only tested it on my x86_64-linux machine.

Not entirely sure about this either. @ICE-GB do you remember why it's there?

Sorry, I’ve completely forgotten the details. However, it builds and runs fine after removing GTK4 based on this PR.
image

@feschber
Copy link
Owner

feel free to update the flake.

Perfect, the updated flake.lock is already pushed, the checks have passed, let me know if there is anything else needed.

Is there really a benefit to pulling in systems.url = "github:nix-systems/default";?
Is this something that is widely used? It seems a bit unnecessary to me.
But let me know your thoughts on this.

Other than that lgtm!

@onelocked
Copy link
Contributor Author

Is there really a benefit to pulling in systems.url = "github:nix-systems/default";? Is this something that is widely used? It seems a bit unnecessary to me. But let me know your thoughts on this.

I've removed the systems input. I guess there isn't really much benefit to it, other than visually/aesthetically. And hopefully we avoid another left-pad incident.

I drew inspiration from flakes in projects like Hyprland, Vicinae and Nixvim, they all use the systems.url input. Especially the Vicinae flake I drew heavy inspiration from, I took their forEachPkgs boilerplate as I thought its really cool and slightly modified it to fit this project.

P.S.
Feel free to squash these commits.

@feschber feschber merged commit cd9fc43 into feschber:main Mar 24, 2026
20 checks passed
@feschber
Copy link
Owner

Thank you!

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.

3 participants