@@ -13,12 +13,13 @@ module Distribution.Nixpkgs.Meta
1313
1414
1515import Control.DeepSeq.Generics
16−import Internal.Lens
17−import Distribution.Nixpkgs.License
18−import Internal.PrettyPrinting
19−import GHC.Generics ( Generic )
2016import Data.Set ( Set )
2117import qualified Data.Set as Set
18+import Distribution.Nixpkgs.License
19+import GHC.Generics ( Generic )
20+import Internal.Lens
21+import Internal.PrettyPrinting
22+import Language.Nix.Identifier
2223
2324-- | A representation of the @meta@ section used in Nix expressions.
2425--
@@ -41,13 +42,13 @@ import qualified Data.Set as Set
4142-- but no parsing as of now!
4243
4344data Meta = Meta
44− { _homepage :: String -- ^ URL of the package homepage
45− , _description :: String -- ^ short description of the package
46− , _license :: License -- ^ licensing terms
47− , _platforms :: Set String -- ^ list of supported platforms (from @pkgs\/lib\/platforms.nix@)
48− , _hydraPlatforms :: Set String -- ^ list of platforms built by Hydra (from @pkgs\/lib\/platforms.nix@)
49− , _maintainers :: Set String -- ^ list of maintainers from @pkgs\/lib\/maintainers.nix@
50− , _broken :: Bool -- ^ set to @true@ if the build is known to fail
45+ { _homepage :: String -- ^ URL of the package homepage
46+ , _description :: String -- ^ short description of the package
47+ , _license :: License -- ^ licensing terms
48+ , _platforms :: Set String -- ^ list of supported platforms (from @pkgs\/lib\/platforms.nix@)
49+ , _hydraPlatforms :: Set String -- ^ list of platforms built by Hydra (from @pkgs\/lib\/platforms.nix@)
50+ , _maintainers :: Set Identifier -- ^ list of maintainers from @pkgs\/lib\/maintainers.nix@
51+ , _broken :: Bool -- ^ set to @true@ if the build is known to fail
5152 }
5253 deriving (Show, Eq, Ord, Generic)
5354
@@ -64,7 +65,7 @@ instance Pretty Meta where
6465 [ text "platforms" <+> equals, renderPlatformList (Set.toAscList _platforms) ]
6566 , onlyIf (not (Set.null _hydraPlatforms)) $ sep
6667 [ text "hydraPlatforms" <+> equals, renderPlatformList (Set.toAscList _hydraPlatforms) ]
67− , listattr "maintainers" (text "with stdenv.lib.maintainers;") (Set.toAscList _maintainers)
68+ , setattr "maintainers" (text "with stdenv.lib.maintainers;") (Set.map (view ident) _maintainers)
6869 , boolattr "broken" _broken _broken
6970 ]
7071