I use an overlay to “inject” the stable pkgs into the unstable branch, but I get a conflict with a pkg option that uses the same keyword, stable
.
-
pkgs.stable
: I use the overlay below so that I can use pkgs from the stable branch if they are broken on unstable. I’m unsure if this implementation is the recommended one, I’m still learning. - The
kicad
package defines an option calledstable
(see here) .
It turns out that the kicad option conflicts with the overlay. I can not install the package but get instead a cryptic error that I traced back to this issue:
error: expected a Boolean but found a set: { _type = "pkgs"; AAAAAASomeThingsFailToEvaluate = «thunk»; AMB-plugins = «thunk»; ArchiSteamFarm = «thunk»; AusweisApp2 = «thunk»; BeatSaberModManager = «thunk»; CHOWTapeModel = «thunk»; ChowCentaur = «thunk»; ChowKick = «thunk»; ChowPhaser = «thunk»; «19881 attributes elided» }
at /nix/store/xnjw9gmfmpppdj6bxpw6cfkspc3h6xwl-source/pkgs/applications/science/electronics/kicad/default.nix:276:20:
275| meta = rec {
276| description = (if (stable)
| ^
277| then "Open Source Electronics Design Automation suite"
This is unexpected (for me) since one is a package option and the other should be nested under pgks
. How should I go about this? Running KiCAD from nix-shell works as expected.
Appendix
Stable overlay on unstable, in file stable.nix
:
{ inputs, ... }:
let
overlay-stable = final: prev: {
stable = import inputs.nixpkgs-stable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
in
{
nixpkgs.overlays = [ overlay-stable ];
}
Then, in my flake:
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
···
nixosConfigurations = {
server = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
./overlays
./nixos/hosts/server.nix
home-manager.nixosModules.home-manager
];
};
};
I use flakes. Is this a flake specific issue? I’m quite new to this…