about summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2008-02-10 16:44:43 +0000
committerMichael Raskin <7c6f434c@mail.ru>2008-02-10 16:44:43 +0000
commit4df190c703f8779fcbdc32df19e6fbed36654e99 (patch)
tree0d117338f027dd72301e683d7d5761d41c91a501 /pkgs/lib
parentc264b316b1eeaadd15ee0e7ba11b78a2deff88c9 (diff)
downloadnixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar.gz
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar.bz2
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar.lz
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar.xz
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.tar.zst
nixlib-4df190c703f8779fcbdc32df19e6fbed36654e99.zip
Various fixes and updates to build that all.
svn path=/nixpkgs/branches/stdenv-updates/; revision=10568
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index 87d08ab7c1c0..1018d9609078 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -176,6 +176,10 @@ rec {
   # (e.g. `++ optional (system == "i686-linux") flashplayer').
   optional = cond: elem: if cond then [elem] else [];
 
+  
+  # Return a list or an empty list, dependening on a boolean value.
+  optionals = cond: elems: if cond then elems else [];
+
 
   # Return a list of integers from `first' up to and including `last'.
   range = first: last: