aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-10-26 13:05:49 +0200
committertv <tv@krebsco.de>2021-10-26 13:52:25 +0200
commit6ef8900af4bca2901f00c718e3ac8ba457348451 (patch)
tree10040eadad68b8f8287473b1dd2c4ce67bed6853 /lib
parent53eda9cafee46a506053099c6ced393aa5675f86 (diff)
populate file: admit derivations1.26.0
Diffstat (limited to 'lib')
-rw-r--r--lib/types/populate.nix8
1 files changed, 6 insertions, 2 deletions
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;