diff options
author | Domen Kožar <domen@dev.si> | 2014-07-27 13:52:11 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-07-27 13:54:37 +0200 |
commit | e3319eb73d9b3ca6edbb23d58019464d9b9ba167 (patch) | |
tree | 68dfd60f666a80ce7c474e312fe1edcd7f2f6223 /doc/meta.xml | |
parent | c8cd4275a3ba3fa625d7d586773e13bae4b32b8e (diff) | |
download | nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar.gz nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar.bz2 nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar.lz nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar.xz nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.tar.zst nixpkgs-e3319eb73d9b3ca6edbb23d58019464d9b9ba167.zip |
doc: modernize meta attributes documentation
Diffstat (limited to 'doc/meta.xml')
-rw-r--r-- | doc/meta.xml | 78 |
1 files changed, 47 insertions, 31 deletions
diff --git a/doc/meta.xml b/doc/meta.xml index 6c8e458509a..d497ae41315 100644 --- a/doc/meta.xml +++ b/doc/meta.xml @@ -17,7 +17,9 @@ meta = { It is fully customizable. ''; homepage = http://www.gnu.org/software/hello/manual/; - license = "GPLv3+"; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.all; }; </programlisting> @@ -32,15 +34,33 @@ command-line using <command>nix-env</command>: <screen> $ nix-env -qa hello --meta --xml -<?xml version='1.0' encoding='utf-8'?> -<items> - <item attrPath="hello" name="hello-2.3" system="i686-linux"> - <meta name="description" value="A program that produces a familiar, friendly greeting" /> - <meta name="homepage" value="http://www.gnu.org/software/hello/manual/" /> - <meta name="license" value="GPLv3+" /> - <meta name="longDescription" value="GNU Hello is a program that prints &quot;Hello, world!&quot; when you run it.&#xA;It is fully customizable.&#xA;" /> - </item> -</items> +<?xml version='1.0' encoding='utf-8'?> +<items> + <item attrPath="nixos.pkgs.hello" name="hello-2.9" system="x86_64-linux"> + <meta name="description" type="string" value="A program that produces a familiar, friendly greeting" /> + <meta name="homepage" type="string" value="http://www.gnu.org/software/hello/manual/" /> + <meta name="license" type="string" value="GPLv3+" /> + <meta name="longDescription" type="string" value="GNU Hello is a program that prints &quot;Hello, world!&quot; when you run it.&#xA;It is fully customizable.&#xA;" /> + <meta name="maintainers" type="strings"> + <string value="Ludovic Courtès &lt;ludo@gnu.org&gt;" /> + </meta> + <meta name="platforms" type="strings"> + <string value="i686-linux" /> + <string value="x86_64-linux" /> + <string value="armv5tel-linux" /> + <string value="armv7l-linux" /> + <string value="mips64el-linux" /> + <string value="x86_64-darwin" /> + <string value="i686-cygwin" /> + <string value="i686-freebsd" /> + <string value="x86_64-freebsd" /> + <string value="i686-openbsd" /> + <string value="x86_64-openbsd" /> + </meta> + <meta name="position" type="string" value="/nix/store/cn8zjjdd9kvmp1p5d21h7ya0cr1jhkk3-nixos-14.10pre44264.12f06b3/nixos/nixpkgs/pkgs/applications/misc/hello/ex-2/default.nix:14" /> + </item> +</items> + </screen> <command>nix-env</command> knows about the @@ -92,20 +112,22 @@ interpretation:</para> <varlistentry> <term><varname>license</varname></term> - <listitem><para>The license for the package. See below for the - allowed values.</para></listitem> + <listitem><para>The license for the package. One from attribute set defined in + <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix"> + <filename>nixpkgs/lib/licenses.nix</filename></link>. + Example: + <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem> </varlistentry> <varlistentry> <term><varname>maintainers</varname></term> <listitem><para>A list of names and e-mail addresses of the - maintainers of this Nix expression, e.g. <literal>["Alice - <alice@example.org>" "Bob <bob@example.com>"]</literal>. If - you are the maintainer of multiple packages, you may want to add + maintainers of this Nix expression. If + you would like to be a maintainer of a package, you may want to add yourself to <link - xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>pkgs/lib/maintainers.nix</filename></link> - and write something like <literal>[stdenv.lib.maintainers.alice - stdenv.lib.maintainers.bob]</literal>.</para></listitem> + xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link> + and write something like <literal>[ stdenv.lib.maintainers.alice + stdenv.lib.maintainers.bob ]</literal>.</para></listitem> </varlistentry> <varlistentry> @@ -121,29 +143,23 @@ interpretation:</para> <varlistentry> <term><varname>platforms</varname></term> <listitem><para>The list of Nix platform types on which the - package is supported. If this attribute is set, the package will - refuse to build, and won’t show up in <literal>nix-env - -qa</literal> output, on any platform not listed - here. An example is: - -<programlisting> -meta.platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; -</programlisting> - - The set <varname>lib.platforms</varname> defines various common - lists of platforms types, so it’s more typical to write: + package is supported. An example is: <programlisting> -meta.platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; +meta.platforms = stdenv.lib.platforms.linux; </programlisting> + Attribute Set <varname>stdenv.lib.platforms</varname> in + <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/platforms.nix"> + <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common + lists of platforms types. </para></listitem> </varlistentry> <varlistentry> <term><varname>hydraPlatforms</varname></term> <listitem><para>The list of Nix platform types for which the Hydra - instance at <literal>hydra.nixos.org</literal> should build the + instance at <literal>hydra.nixos.org</literal> will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of <varname>meta.platforms</varname>. Thus, the only reason to set <varname>meta.hydraPlatforms</varname> is |