3
0
Fork 0
forked from mirrors/nixpkgs

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; 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 { path = mkOptionType {
name = "path"; name = "path";
descriptionClass = "noun"; descriptionClass = "noun";

View file

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