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
|
final: prev: let
|
||||||
inherit (final.lib) optionalAttrs;
|
|
||||||
python3 = final.python3;
|
python3 = final.python3;
|
||||||
pyPkgs = python3.pkgs;
|
pyPkgs = python3.pkgs;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
reticulumStack = python3.pkgs.buildPythonApplication rec {
|
reticulumStack = python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "reticulum";
|
pname = "reticulum";
|
||||||
version = "1.2.9";
|
version = "1.2.9";
|
||||||
@@ -80,9 +80,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# meshtastic may not be in all nixpkgs versions (not in 25.11 stable)
|
# meshtastic may not exist in all nixpkgs versions (e.g. not in 25.11)
|
||||||
// optionalAttrs (builtins.hasAttr "meshtastic" prev) {
|
// prev.lib.optionalAttrs (prev ? meshtastic) {
|
||||||
meshtastic = prev.meshtastic.overrideAttrs (old: {
|
inherit (prev) meshtastic;
|
||||||
dontCheckRuntimeDeps = true;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user