From e76aee9d2f529848c60d2d91339074d46f395ebb Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Fri, 21 Jan 2011 08:25:06 +0000 Subject: [PATCH] Make it possible to call 'callPackage function' svn path=/nixpkgs/trunk/; revision=25657 --- pkgs/lib/customisation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix index f97b494ae92..d2af4814628 100644 --- a/pkgs/lib/customisation.nix +++ b/pkgs/lib/customisation.nix @@ -89,7 +89,7 @@ rec { }; */ callPackageWith = autoArgs: fn: args: - let f = import fn; in + let f = if builtins.isFunction fn then fn else import fn; in makeOverridable f ((builtins.intersectAttrs (builtins.functionArgs f) autoArgs) // args); }