33 lines
674 B
Nix
33 lines
674 B
Nix
{ lib, ... }:
|
|
with lib;
|
|
{
|
|
config.outputKinds = [
|
|
(_: {
|
|
options = {
|
|
lib = mkOption {
|
|
type = with types; anything;
|
|
description = ''
|
|
Exported from the flake at `.lib` and `.lib.<system>` respectively.
|
|
Arbitrary shape. Intended for use in "library" flakes, exporting the Nix
|
|
expressions.
|
|
'';
|
|
};
|
|
};
|
|
outputs =
|
|
{
|
|
config,
|
|
hasSystem,
|
|
system,
|
|
...
|
|
}:
|
|
if hasSystem then
|
|
{
|
|
lib.${system} = config.lib;
|
|
}
|
|
else
|
|
{
|
|
lib = config.lib;
|
|
};
|
|
})
|
|
];
|
|
}
|