@@ -1,12 +1,15 @@
11{- |
22 Module : Distribution.NixOS.Derivation.Meta
3− Copyright : Peter Simons, Andres Loeh
43 License : BSD3
54
65 Maintainer : nix-dev@cs.uu.nl
76 Stability : provisional
87 Portability : portable
9−-}
8+
9+ A representation of the @meta@ section used in Nix expressions. A
10+ detailed description can be found in section 4, \"Meta-attributes\",
11+ of the Nixpkgs manual at <http://nixos.org/nixpkgs/docs.html>.
12+ -}
1013
1114module Distribution.NixOS.Derivation.Meta
1215 ( Meta(..)
@@ -18,12 +21,29 @@ import Distribution.NixOS.PrettyPrinting
1821import Distribution.NixOS.Derivation.License
1922import Distribution.Text
2023
24+-- | A representation of the @meta@ section used in Nix expressions.
25+--
26+-- > > putStrLn (display (Meta "http://example.org" "an example package" (Unknown Nothing)
27+-- > > ["stdenv.lib.platforms."++x | x<-["unix","cygwin"]]
28+-- > > ["stdenv.lib.maintainers."++x | x<-["joe","jane"]]))
29+-- > meta = {
30+-- > homepage = "http://example.org";
31+-- > description = "an example package";
32+-- > license = "unknown";
33+-- > platforms =
34+-- > stdenv.lib.platforms.unix ++ stdenv.lib.platforms.cygwin;
35+-- > maintainers = [ stdenv.lib.maintainers.joe stdenv.lib.maintainers.jane ];
36+-- > };
37+--
38+-- Note that the "Text" instance definition provides pretty-printing,
39+-- but no parsing as of now!
40+
2141data Meta = Meta
22− { homepage :: String
23− , description :: String
24− , license :: License
25− , platforms :: [String]
26− , maintainers :: [String]
42+ { homepage :: String -- ^ URL of the package homepage
43+ , description :: String -- ^ short description of the package
44+ , license :: License -- ^ licensing terms
45+ , platforms :: [String] -- ^ list of supported platforms from @pkgs\/lib\/platforms.nix@
46+ , maintainers :: [String] -- ^ list of maintainers from @pkgs\/lib\/maintainers.nix@
2747 }
2848 deriving (Show, Eq, Ord)
2949