1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/nixos/doc/manual
aszlig 6fec28e043
nixos-manual: Further simplify stripAnyPrefixes
First of all this fixes an evaluation error I introduced in ae466ba,
which wasn't triggered by any of my own tests against the change because
there are usually no NixOS options that are declared outside of the
<nixpkgs> tree. I renamed the attribute name from "fn" to "fileName"
first and later to "fullPath" but forgot one still occuring "filename".

Thanks to @vcunat for noticing this.

Another thing that he pointed out was that the "stripPrefix" function
can be factored away entirely, because it's very similar to
"removePrefix" in <nixpkgs/lib>.

Unfortunately we can't use "removePrefix" as is, because we need to
account for the final shlash.

So instead of removing it twice and/or retaining "stripPrefix", let's
append a shlash on every "prefixesToStrip" and we can use "removePrefix"
as is.

Tested with:

taalo-build nixos/release.nix -A tests.installer.simple.x86_64-linux

And:

w3m -dump "$(
  nix-build nixos/release.nix -A manual.x86_64-linux
)/share/doc/nixos/options.html"

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @vcunat
2016-01-29 20:14:11 +01:00
..
administration
configuration nixos/doc: fix to: ~/.nix-defexpr wasn't created, fixes #6606 2016-01-20 04:59:16 +01:00
development nixos: update-locatedb - harden via systemd (#7220) 2016-01-23 20:44:30 +00:00
installation
release-notes nixos changelog: mention postfix changes 2016-01-21 12:48:30 +03:00
default.nix nixos-manual: Further simplify stripAnyPrefixes 2016-01-29 20:14:11 +01:00
man-configuration.xml
man-nixos-build-vms.xml
man-nixos-generate-config.xml
man-nixos-install.xml
man-nixos-option.xml
man-nixos-rebuild.xml
man-pages.xml
manual.xml
options-to-docbook.xsl
README
style.css

To build the manual, you need Nix installed on your system (no need
for NixOS). To install Nix, follow the instructions at

    https://nixos.org/nix/download.html

When you have Nix on your system, in the root directory of the project
(i.e., `nixpkgs`), run:

    nix-build nixos/release.nix -A manual.x86_64-linux

When this command successfully finishes, it will tell you where the
manual got generated.