diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-26 17:14:08 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-26 17:14:08 +0000 |
commit | ca13d6918e910df26a70ca9248707d375b8ba274 (patch) | |
tree | 53a6a30439090ac60cec6b10d291b2b438153939 | |
parent | 5977d741b8d6b54e92d096807feca1a31c336b83 (diff) |
* 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
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8f1d631f4e08..db930fdda0268 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; }; |