From 6ef8900af4bca2901f00c718e3ac8ba457348451 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 26 Oct 2021 13:05:49 +0200 Subject: populate file: admit derivations --- lib/types/populate.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/types/populate.nix') diff --git a/lib/types/populate.nix b/lib/types/populate.nix index 894b8cc..18b5cd8 100644 --- a/lib/types/populate.nix +++ b/lib/types/populate.nix @@ -21,11 +21,15 @@ }; file = lib.mkOption { apply = x: - if lib.types.absolute-pathname.check x + if lib.types.absolute-pathname.check x || lib.types.package.check x then { path = x; } else x; default = null; - type = lib.types.nullOr (lib.types.either lib.types.absolute-pathname source-types.file); + type = lib.types.nullOr (lib.types.oneOf [ + lib.types.absolute-pathname + lib.types.package + source-types.file + ]); }; git = lib.mkOption { default = null; -- cgit v1.2.3