lib.types.pkgs: init

A nominal type.
This commit is contained in:
Robert Hensing 2023-05-07 15:27:05 +02:00
parent 897876e4c4
commit 16d594a0e2
2 changed files with 12 additions and 0 deletions

View File

@ -476,6 +476,14 @@ rec {
check = x: isDerivation x && hasAttr "shellPath" x;
};
pkgs = addCheck
(unique { message = "A Nixpkgs pkgs set can not be merged with another pkgs set."; } attrs // {
name = "pkgs";
descriptionClass = "noun";
description = "Nixpkgs package set";
})
(x: (x._type or null) == "pkgs");
path = mkOptionType {
name = "path";
descriptionClass = "noun";

View File

@ -99,6 +99,10 @@ merging is handled.
problems.
:::
`types.pkgs`
: A type for the top level Nixpkgs package set.
### Numeric types {#sec-option-types-numeric}
`types.int`