pkgs overlay: prefer my own packages, if theyre newer than whats in nixpkgs

this gives me an easier way to test updates for the packages i maintain than a workflow based on patching nixpkgs
This commit is contained in:
2024-02-18 04:07:23 +00:00
parent 6760fcf1f4
commit a3102c9395

View File

@@ -148,7 +148,14 @@ let
}
# patched packages always override anything:
// (lib.mapAttrs (pname: _pkg: final'.sane."${pname}") sane-patched)
# "additional" packages only get added if they've not been upstreamed:
// (lib.mapAttrs (pname: _pkg: unpatched."${pname}" or final'.sane."${pname}") sane-additional)
# "additional" packages only get added if their version is newer than upstream
// (lib.mapAttrs
(pname: _pkg: if unpatched ? "${pname}" && lib.versionAtLeast unpatched."${pname}".version final'.sane."${pname}".version then
unpatched."${pname}"
else
final'.sane."${pname}"
)
sane-additional
)
;
in sane-overlay