nix-dotfiles/overlays/lib/trivial.nix

8 lines
151 B
Nix
Raw Normal View History

2022-03-07 16:01:52 +01:00
final: prev:
let
in prev.lib.trivial // {
# a -> b -> Either (a b)
withDefault = default: value:
if (value == null) then default else value;
}