diff options
author | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-11-07 01:58:56 +0000 |
---|---|---|
committer | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-11-07 01:58:56 +0000 |
commit | 10d74af2f640f29b134427002f6c623ae00c864d (patch) | |
tree | a6fbcf0775727b5755617706e2cc4119e6445bbf /pkgs/lib/types.nix | |
parent | 2b11697d1a61b7565c53b2e716fd2ce7af84ab80 (diff) | |
download | nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar.gz nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar.bz2 nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar.lz nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar.xz nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.tar.zst nixpkgs-10d74af2f640f29b134427002f6c623ae00c864d.zip |
* Add a type to handle environment variables with the usual string
separator ":". svn path=/nixpkgs/trunk/; revision=18239
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r-- | pkgs/lib/types.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix index 01a5d98fca6..c806e922e35 100644 --- a/pkgs/lib/types.nix +++ b/pkgs/lib/types.nix @@ -40,7 +40,7 @@ rec { }; - types = { + types = rec { inferred = mkOptionType { name = "inferred type"; @@ -63,6 +63,12 @@ rec { merge = lib.concatStrings; }; + envVar = mkOptionType { + name = "environment variable"; + inherit (string) check; + merge = lib.concatStringsSep ":"; + }; + attrs = mkOptionType { name = "attribute set"; check = lib.traceValIfNot builtins.isAttrs; |