nix-ros-overlay/lib/mk-overlay.nix
2019-12-06 17:19:28 -05:00

12 lines
305 B
Nix

{ lib }:
with lib;
rec {
applyOverlays = self: super: overlays: let
curSuper = applyOverlays self super (init overlays);
in if length overlays == 0 then super
else curSuper // (last overlays) self curSuper;
mkOverlay = overlays: let
self = applyOverlays self {} overlays;
in self;
}