fix(overlay): avoid recursion with final.lib, use prev.lib.optionalAttrs
Replace recursive `final.lib.optionalAttrs` with `prev.lib.optionalAttrs` using the `?` operator to check for meshtastic existence safely. This allows the overlay to work with both stable (25.11) and unstable.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
final: prev: let
|
||||
inherit (final.lib) optionalAttrs;
|
||||
python3 = final.python3;
|
||||
pyPkgs = python3.pkgs;
|
||||
in {
|
||||
in
|
||||
{
|
||||
reticulumStack = python3.pkgs.buildPythonApplication rec {
|
||||
pname = "reticulum";
|
||||
version = "1.2.9";
|
||||
@@ -79,10 +79,8 @@ in {
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
}
|
||||
# meshtastic may not be in all nixpkgs versions (not in 25.11 stable)
|
||||
// optionalAttrs (builtins.hasAttr "meshtastic" prev) {
|
||||
meshtastic = prev.meshtastic.overrideAttrs (old: {
|
||||
dontCheckRuntimeDeps = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
# meshtastic may not exist in all nixpkgs versions (e.g. not in 25.11)
|
||||
// prev.lib.optionalAttrs (prev ? meshtastic) {
|
||||
inherit (prev) meshtastic;
|
||||
}
|
||||
Reference in New Issue
Block a user