summary refs log tree commit diff
path: root/pkgs/lib/types.nix
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2009-11-19 17:19:39 +0000
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2009-11-19 17:19:39 +0000
commit56ed820f84101fc7b7cc47cbb1f57e616f35ac73 (patch)
tree03815ba25182ffc336e965ba28b147eb3389f877 /pkgs/lib/types.nix
parent6ba27ab5521e4439c082c868dcf692fea0e6f876 (diff)
downloadnixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar.gz
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar.bz2
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar.lz
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar.xz
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.tar.zst
nixpkgs-56ed820f84101fc7b7cc47cbb1f57e616f35ac73.zip
Add systems.nix give more control over the increasing list of supported
systems.  This is not yet used because it has to be integrated with the
current system.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18468
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r--pkgs/lib/types.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix
index d71cb9df097..fd3c071c0be 100644
--- a/pkgs/lib/types.nix
+++ b/pkgs/lib/types.nix
@@ -12,6 +12,10 @@ rec {
   hasType = x: isAttrs x && x ? _type;
   typeOf = x: if hasType x then x._type else "";
 
+  setType = typeName: value: value // {
+    _type = typeName;
+  };
+
   
   # name (name of the type)
   # check (boolean function)