* 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
This commit is contained in:
parent
5977d741b8
commit
ca13d6918e
@ -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; };
|
||||
|
Loading…
Reference in New Issue
Block a user