From e0fbc4d14caff569c06bdd1ff9bc9f8fe4ebca41 Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 30 Nov 2020 09:36:18 -0800 Subject: [PATCH 1/4] doc/builders/packages/xorg: Convert to CommonMark. I had to pick 7.4 or 7.5. I picked 7.4 for now. --- doc/builders/packages/index.xml | 2 +- doc/builders/packages/xorg.section.md | 41 +++++++++++++++++++++++++++ doc/builders/packages/xorg.xml | 34 ---------------------- 3 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 doc/builders/packages/xorg.section.md delete mode 100644 doc/builders/packages/xorg.xml diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml index d967718cab39..3007c297c163 100644 --- a/doc/builders/packages/index.xml +++ b/doc/builders/packages/index.xml @@ -21,5 +21,5 @@ - + diff --git a/doc/builders/packages/xorg.section.md b/doc/builders/packages/xorg.section.md new file mode 100644 index 000000000000..c8a4c1219818 --- /dev/null +++ b/doc/builders/packages/xorg.section.md @@ -0,0 +1,41 @@ +# X.org {#sec-xorg} + +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, the generator script or the +file `pkgs/servers/x11/xorg/overrides.nix`, in which you can override or add +to the derivations produced by the generator. + +The generator is invoked as follows: + +```sh +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: + +```sh +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 `pkgs/servers/x11/xorg/overrides.nix`. diff --git a/doc/builders/packages/xorg.xml b/doc/builders/packages/xorg.xml deleted file mode 100644 index ebf4930cc097..000000000000 --- a/doc/builders/packages/xorg.xml +++ /dev/null @@ -1,34 +0,0 @@ -
- 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, the generator script or the file pkgs/servers/x11/xorg/overrides.nix, in which you can override or add to the derivations produced by the generator. - - - - The generator is invoked as follows: - -$ cd pkgs/servers/x11/xorg -$ cat tarballs-7.5.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.5.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 pkgs/servers/x11/xorg/overrides.nix. - -
From fc0f32e0f5c2b9839d92ae22dbe344e703e0d691 Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 30 Nov 2020 10:35:21 -0800 Subject: [PATCH 2/4] doc/builders/packages/xorg: Acknowledge the retired katamari. I tested the shell snippets shown here; they work. Note that, because they're intended for copy-and-paste, I did *not* make them into ShellSessions with prompts. But that's something I can do if desired. --- doc/builders/packages/xorg.section.md | 53 ++++++++++++--------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/doc/builders/packages/xorg.section.md b/doc/builders/packages/xorg.section.md index c8a4c1219818..4e49450f43e7 100644 --- a/doc/builders/packages/xorg.section.md +++ b/doc/builders/packages/xorg.section.md @@ -1,41 +1,34 @@ # X.org {#sec-xorg} -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, the generator script or the -file `pkgs/servers/x11/xorg/overrides.nix`, in which you can override or add -to the derivations produced by the generator. +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, the generator script or the file `pkgs/servers/x11/xorg/overrides.nix`, in which you can override or add to the derivations produced by the generator. + +## Katamari Tarballs + +X.org upstream releases used to include [katamari](https://en.wiktionary.org/wiki/%E3%81%8B%E3%81%9F%E3%81%BE%E3%82%8A) releases, which included a holistic recommended version for each tarball, up until 7.7. To create a list of tarballs in a katamari release: + +```sh +export release="X11R7.7" +export url="mirror://xorg/X11R7.4/src/everything/" +cat $(PRINT_PATH=1 nix-prefetch-url $url | tail -n 1) \ + | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'url'}$2\n"; }; }' \ + | sort > "tarballs-$release.list" +``` + +## Individual Tarballs + +The upstream release process for [X11R7.8](https://x.org/wiki/Releases/7.8/) does not include a planned katamari. Instead, each component of X.org is released as its own tarball. We maintain `pkgs/servers/x11/xorg/tarballs.list` as a list of tarballs for each individual package. This list includes X.org core libraries and protocol descriptions, extra newer X11 interface libraries, like `xorg.libxcb`, and classic utilities which are largely unused but still available if needed, like `xorg.imake`. + +## Generating Nix Expressions The generator is invoked as follows: ```sh cd pkgs/servers/x11/xorg -cat tarballs-7.4.list extra.list old.list | perl ./generate-expr-from-tarballs.pl +) { 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 `pkgs/servers/x11/xorg/overrides.nix`. +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 `pkgs/servers/x11/xorg/overrides.nix`. From 65fe2546b765c19283a44f892d5c38d88d7db00f Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 30 Nov 2020 11:36:34 -0800 Subject: [PATCH 3/4] doc/builders/packages/xorg: Fix pasto. I did double-check that the fixed version does what we would want. In either case, the katamari script is mostly of historical value, and there's nothing to change in pkgs. --- doc/builders/packages/xorg.section.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/builders/packages/xorg.section.md b/doc/builders/packages/xorg.section.md index 4e49450f43e7..92df9e5464a3 100644 --- a/doc/builders/packages/xorg.section.md +++ b/doc/builders/packages/xorg.section.md @@ -8,7 +8,7 @@ X.org upstream releases used to include [katamari](https://en.wiktionary.org/wik ```sh export release="X11R7.7" -export url="mirror://xorg/X11R7.4/src/everything/" +export url="mirror://xorg/$release/src/everything/" cat $(PRINT_PATH=1 nix-prefetch-url $url | tail -n 1) \ | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'url'}$2\n"; }; }' \ | sort > "tarballs-$release.list" From 874e3587eef756c7845d63cffe00a2f3662a8aee Mon Sep 17 00:00:00 2001 From: Corbin Date: Mon, 30 Nov 2020 22:03:23 -0800 Subject: [PATCH 4/4] doc/builders/packages/xorg: Use ShellSession for shell. I was worried, but the HTML output can still be copy-and-pasted, so it's not a problem. --- doc/builders/packages/xorg.section.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/builders/packages/xorg.section.md b/doc/builders/packages/xorg.section.md index 92df9e5464a3..be220a25404a 100644 --- a/doc/builders/packages/xorg.section.md +++ b/doc/builders/packages/xorg.section.md @@ -6,7 +6,7 @@ The Nix expressions for the X.org packages reside in `pkgs/servers/x11/xorg/defa X.org upstream releases used to include [katamari](https://en.wiktionary.org/wiki/%E3%81%8B%E3%81%9F%E3%81%BE%E3%82%8A) releases, which included a holistic recommended version for each tarball, up until 7.7. To create a list of tarballs in a katamari release: -```sh +```ShellSession export release="X11R7.7" export url="mirror://xorg/$release/src/everything/" cat $(PRINT_PATH=1 nix-prefetch-url $url | tail -n 1) \ @@ -22,7 +22,7 @@ The upstream release process for [X11R7.8](https://x.org/wiki/Releases/7.8/) doe The generator is invoked as follows: -```sh +```ShellSession cd pkgs/servers/x11/xorg