diff --git a/doc/package-notes.xml b/doc/package-notes.xml
index 6291abbe9bd8..9ace151e512b 100644
--- a/doc/package-notes.xml
+++ b/doc/package-notes.xml
@@ -165,12 +165,60 @@ splashutils_15 = ...;
- X.org
- * Expression is auto-generated
- * How to update
+
+X.org
+
+The Nix expressions for the X.org packages reside in
+pkgs/servers/x11/xorg/default.nix. This file is
+automatically generated from lists of tarballs in an X.org
+release. As such it should not be modified directly; rather, you
+should modify the lists or the generator script.
+
+The generator is invoked as follows:
+
+
+$ cd pkgs/servers/x11/xorg
+$ cat tarballs-7.4.list extra.list old.list \
+ | perl ./generate-expr-from-tarballs.pl
+
+
+For each of the tarballs in the .list files, the
+script downloads it, unpacks it, and searches its
+configure.ac and *.pc.in
+files for dependencies. This information is used to generate
+default.nix. The generator caches downloaded
+tarballs between runs. Pay close attention to the NOT FOUND:
+name messages at the end of the
+run, since they may indicate missing dependencies. (Some might be
+optional dependencies, however.)
+
+A file like tarballs-7.4.list contains all
+tarballs in a X.org release. It can be generated like this:
+
+
+$ export i="mirror://xorg/X11R7.4/src/everything/"
+$ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
+ | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
+ | sort > tarballs-7.4.list
+
+
+extra.list contains libraries that aren’t part of
+X.org proper, but are closely related to it, such as
+libxcb. old.list contains
+some packages that were removed from X.org, but are still needed by
+some people or by other packages (such as
+imake).
+
+If the expression for a package requires derivation attributes
+that the generator cannot figure out automatically (say,
+patches or a postInstall hook),
+you should modify the generator script
+(generate-expr-from-tarballs.pl).
+
+