From 99c46f200c31121c437aa8a67aa1f0fcb4147cdc Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 14 Aug 2008 22:12:50 +0000 Subject: [PATCH] Forgot to make composedArgsAndFun support function overrides in addition to attrSet-merging ones. svn path=/nixpkgs/trunk/; revision=12627 --- pkgs/lib/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 4740ec3a407..5ccf8f083f7 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -32,7 +32,11 @@ rec { else (innerComposedArgs f (y x)))); composedArgs = f: innerComposedArgs f {}; - sumTwoArgs = f: x: y: (f (x // y)); + sumTwoArgs = f: x: y: + if builtins.isAttrs y then + (f (x // y)) + else + (f (y x)); composedArgsAndFun = f : x : (f x) // { meta = { function = composedArgsAndFun (sumTwoArgs f x);