The issue
Since the update, building kdePackages.fcitx5-qt fails. This issue occurs in the nixos-unstable branch. (If you want to know about this issue, click this and this). fcitx5 can’t be used because of this issue. It has been fixed in the nixpkgs-unstable or master branch (according to this).
So I want to create an overlay for kdePackages.fcitx5-qt but all of my code failed. Here is code I tried:
# overlays.nix
# Note: `pkgs-unstable` has been initialized in my `flake.nix` and has been delivered there.
{ config, lib, pkgs, pkgs-unstable, ... }:
{
# use `lib.recursiveUpdate`, no effort
nixpkgs.overlays = [
(final: prev: {
kdePackages = final.lib.recursiveUpdate prev.kdePackages {
fcitx5-qt = pkgs-unstable.kdePackages.fcitx5-qt;
};
})
];
# use `lib.attrsets.recursiveUpdate`, no effort
nixpkgs.overlays = [
(final: prev: {
kdePackages = final.lib.attrsets.recursiveUpdate prev.kdePackages {
fcitx5-qt = pkgs-unstable.kdePackages.fcitx5-qt;
};
})
];
# use //, no effort
nixpkgs.overlays = [
(final: prev: {
kdePackages = prev.kdePackages // {
fcitx5-qt = pkgs-unstable.kdePackages.fcitx5-qt;
};
})
];
# this will complain `attribute breeze-icons missing`, won't build.
nixpkgs.overlays = [
(final: prev: {
kdePackages.fcitx5-qt = pkgs-unstable.kdePackages.fcitx5-qt;
})
];
}
Other info:
I use flakes. My inputs looks like this:
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
And I use home-manager. It has been installed through nixos module. fcitx5 is configured through home-manager options. If there are any necessary details I have not mentioned, let me know.
My labor
I use overlay for the first time. I’ve read wiki page and this guide. And LLM also didn’t give any useful solutions. Code above is not all of my labor. I struggled here one whole day ;-(
I appreciate any help.