switch modules/outputs names
This commit is contained in:
parent
e7fdbf416c
commit
482cbf67cd
16 changed files with 147 additions and 147 deletions
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
snow,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
inherit
|
||||
(snow.lib)
|
||||
mkPerSystemFlakeOutput
|
||||
;
|
||||
|
||||
derivationType =
|
||||
lib.types.package
|
||||
// {
|
||||
check = lib.isDerivation;
|
||||
};
|
||||
|
||||
programType = lib.types.coercedTo derivationType lib.getExe lib.types.str;
|
||||
|
||||
appType = lib.types.submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = lib.types.enum ["app"];
|
||||
default = "app";
|
||||
description = ''
|
||||
A type tag for `apps` consumers.
|
||||
'';
|
||||
};
|
||||
program = mkOption {
|
||||
type = programType;
|
||||
description = ''
|
||||
A path to an executable or a derivation with `meta.mainProgram`.
|
||||
'';
|
||||
};
|
||||
meta = mkOption {
|
||||
type = types.lazyAttrsOf lib.types.raw;
|
||||
default = {};
|
||||
# TODO refer to Nix manual 2.25
|
||||
description = ''
|
||||
Metadata information about the app.
|
||||
Standardized in Nix at <https://github.com/NixOS/nix/pull/11297>.
|
||||
|
||||
Note: `nix flake check` is only aware of the `description` attribute in `meta`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
mkPerSystemFlakeOutput {
|
||||
name = "apps";
|
||||
option = mkOption {
|
||||
type = types.lazyAttrsOf appType;
|
||||
default = {};
|
||||
description = ''
|
||||
Programs runnable with nix run `<name>`.
|
||||
'';
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
default.program = "''${config.packages.hello}/bin/hello";
|
||||
}
|
||||
'';
|
||||
};
|
||||
file = ./apps.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue