mirror of
https://github.com/nix-community/nixvim.git
synced 2026-08-24 02:34:15 -05:00
27 lines
496 B
Nix
27 lines
496 B
Nix
{
|
|
system,
|
|
nixpkgs,
|
|
}:
|
|
let
|
|
# Extend nixpkg's lib, so that we can handle recursive leaf types such as `either`
|
|
libOverlay = final: prev: {
|
|
types = prev.types // {
|
|
either =
|
|
t1: t2:
|
|
prev.types.either t1 t2
|
|
// {
|
|
getSubOptions = prefix: t1.getSubOptions prefix // t2.getSubOptions prefix;
|
|
};
|
|
};
|
|
};
|
|
|
|
overlay = final: prev: {
|
|
lib = prev.lib.extend libOverlay;
|
|
};
|
|
|
|
in
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ overlay ];
|
|
}
|