@@ -13,12 +13,13 @@ module Distribution.Nixpkgs.Meta
15import Control.DeepSeq.Generics
15import Control.DeepSeq.Generics
17−import Distribution.Nixpkgs.License
18−import Internal.PrettyPrinting
19−import GHC.Generics ( Generic )
20import Data.Set ( Set )
16import Data.Set ( Set )
21import qualified Data.Set as Set
17import qualified Data.Set as Set
18+import Distribution.Nixpkgs.License
19+import GHC.Generics ( Generic )
21+import Internal.PrettyPrinting
22+import Language.Nix.Identifier
23-- | A representation of the @meta@ section used in Nix expressions.
24-- | A representation of the @meta@ section used in Nix expressions.
@@ -41,13 +42,13 @@ import qualified Data.Set as Set
41-- but no parsing as of now!
42-- but no parsing as of now!
43data Meta = Meta
44data Meta = Meta
44− { _homepage :: String -- ^ URL of the package homepage
45+ { _homepage :: String -- ^ URL of the package homepage
45− , _description :: String -- ^ short description of the package
46+ , _description :: String -- ^ short description of the package
46− , _license :: License -- ^ licensing terms
47+ , _license :: License -- ^ licensing terms
47− , _platforms :: Set String -- ^ list of supported platforms (from @pkgs\/lib\/platforms.nix@)
48+ , _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+ , _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+ , _maintainers :: Set Identifier -- ^ list of maintainers from @pkgs\/lib\/maintainers.nix@
50− , _broken :: Bool -- ^ set to @true@ if the build is known to fail
51+ , _broken :: Bool -- ^ set to @true@ if the build is known to fail
52 deriving (Show, Eq, Ord, Generic)
53 deriving (Show, Eq, Ord, Generic)
@@ -64,7 +65,7 @@ instance Pretty Meta where
64 [ text "platforms" <+> equals, renderPlatformList (Set.toAscList _platforms) ]
65 [ text "platforms" <+> equals, renderPlatformList (Set.toAscList _platforms) ]
65 , onlyIf (not (Set.null _hydraPlatforms)) $ sep
66 , onlyIf (not (Set.null _hydraPlatforms)) $ sep
66 [ text "hydraPlatforms" <+> equals, renderPlatformList (Set.toAscList _hydraPlatforms) ]
67 [ 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)
68 , boolattr "broken" _broken _broken
69 , boolattr "broken" _broken _broken