stdenv: Remove extra merge operator in meta (#430132)

authored by philiptaron.tngl.sh and committed by GitHub 85b1221c 4d69954e

+10 -12
+10 -12
pkgs/stdenv/generic/check-meta.nix
··· 26 26 isAttrs 27 27 isString 28 28 mapAttrs 29 - filterAttrs 30 29 ; 31 30 32 31 inherit (lib.lists) ··· 576 575 let 577 576 outputs = attrs.outputs or [ "out" ]; 578 577 hasOutput = out: builtins.elem out outputs; 578 + maintainersPosition = builtins.unsafeGetAttrPos "maintainers" (attrs.meta or { }); 579 + teamsPosition = builtins.unsafeGetAttrPos "teams" (attrs.meta or { }); 579 580 in 580 581 { 581 582 # `name` derivation attribute includes cross-compilation cruft, ··· 604 605 ) 605 606 ] 606 607 ++ optional (hasOutput "man") "man"; 607 - } 608 - // (filterAttrs (_: v: v != null) { 608 + 609 609 # CI scripts look at these to determine pings. Note that we should filter nulls out of this, 610 610 # or nix-env complains: https://github.com/NixOS/nix/blob/2.18.8/src/nix-env/nix-env.cc#L963 611 - maintainersPosition = builtins.unsafeGetAttrPos "maintainers" (attrs.meta or { }); 612 - teamsPosition = builtins.unsafeGetAttrPos "teams" (attrs.meta or { }); 613 - }) 611 + ${if maintainersPosition == null then null else "maintainersPosition"} = maintainersPosition; 612 + ${if teamsPosition == null then null else "teamsPosition"} = teamsPosition; 613 + } 614 614 // attrs.meta or { } 615 - # Fill `meta.position` to identify the source location of the package. 616 - // optionalAttrs (pos != null) { 617 - position = pos.file + ":" + toString pos.line; 618 - } 619 615 // { 616 + # Fill `meta.position` to identify the source location of the package. 617 + ${if pos == null then null else "position"} = pos.file + ":" + toString pos.line; 618 + 620 619 # Maintainers should be inclusive of teams. 621 620 # Note that there may be external consumers of this API (repology, for instance) - 622 621 # if you add a new maintainer or team attribute please ensure that this expectation is still met. 623 622 maintainers = 624 623 attrs.meta.maintainers or [ ] ++ concatMap (team: team.members or [ ]) attrs.meta.teams or [ ]; 625 - } 626 - // { 624 + 627 625 # Expose the result of the checks for everyone to see. 628 626 unfree = hasUnfreeLicense attrs; 629 627 broken = isMarkedBroken attrs;