mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 08:39:08 +03:00
Revert "lib/meta.nix: platformMatch: allow predicate functions"
This reverts commit b7d097438b
.
This commit is contained in:
parent
6821903540
commit
778419b9e6
@ -78,15 +78,10 @@ rec {
|
||||
|
||||
2. (modern) a pattern for the platform `parsed` field.
|
||||
|
||||
3. (functional) a predicate function returning a boolean.
|
||||
|
||||
We can inject these into a pattern for the whole of a structured platform,
|
||||
and then match that.
|
||||
*/
|
||||
platformMatch = platform: elem:
|
||||
if builtins.isFunction elem
|
||||
then elem platform
|
||||
else let
|
||||
platformMatch = platform: elem: let
|
||||
pattern =
|
||||
if builtins.isString elem
|
||||
then { system = elem; }
|
||||
|
@ -271,7 +271,7 @@ let
|
||||
sourceProvenance = listOf lib.types.attrs;
|
||||
maintainers = listOf (attrsOf anything); # TODO use the maintainer type from lib/tests/maintainer-module.nix
|
||||
priority = int;
|
||||
platforms = listOf (oneOf [ str (attrsOf anything) (functionTo bool) ]); # see lib.meta.platformMatch
|
||||
platforms = listOf (either str (attrsOf anything)); # see lib.meta.platformMatch
|
||||
hydraPlatforms = listOf str;
|
||||
broken = bool;
|
||||
unfree = bool;
|
||||
|
Loading…
Reference in New Issue
Block a user