From ca13d6918e910df26a70ca9248707d375b8ba274 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Aug 2009 17:14:08 +0000 Subject: [PATCH] * As predicted, returning {} if a package isn't supported on a platform won't work: nix-env -qa barfs with "error: cannot coerce an attribute set (except a derivation) to a string". So throw an error instead. Anyway, condPackage/platformPackage doesn't belong in all-packages.nix (it should be specified in the package itself). svn path=/nixpkgs/trunk/; revision=16870 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8f1d631f4e..db930fdda02 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -195,7 +195,7 @@ let makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); }; - condPackage = condition: package: if condition then package else {}; + condPackage = condition: package: if condition then package else throw "package not supported"; platformPackage = platforms : package : (condPackage (lib.any (x: x == system) platforms) package) // { meta.platforms = platforms; };