From 16d594a0e2017bfa8b24051f4697d8debc240bfb Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 7 May 2023 15:27:05 +0200 Subject: lib.types.pkgs: init A nominal type. --- lib/types.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/types.nix b/lib/types.nix index e0da18a2febb9..373d0ce7876f9 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -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"; -- cgit 1.4.1