lol

doc: render nixpkgs manual with nrd

also updates nixdoc to 2.3.0. the nixdoc update is not a separate commit
because that would leave the manual build broken for one commit,
potentially breaking bisects and rebases.

pennae be4d19ff b521f451

+395 -729
-101
doc/Makefile
··· 1 - MD_TARGETS=$(addsuffix .xml, $(basename $(shell find . -type f -regex '.*\.md$$' -not -name README.md))) 2 - 3 - PANDOC ?= pandoc 4 - 5 - pandoc_media_dir = media 6 - # NOTE: Keep in sync with conversion script (/maintainers/scripts/db-to-md.sh). 7 - # TODO: Remove raw-attribute when we can get rid of DocBook altogether. 8 - pandoc_commonmark_enabled_extensions = +attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute 9 - # Not needed: 10 - # - docbook-reader/citerefentry-to-rst-role.lua (only relevant for DocBook → MarkDown/rST/MyST) 11 - pandoc_flags = --extract-media=$(pandoc_media_dir) \ 12 - --lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \ 13 - --lua-filter=build-aux/pandoc-filters/myst-reader/roles.lua \ 14 - --lua-filter=$(PANDOC_LINK_MANPAGES_FILTER) \ 15 - --lua-filter=build-aux/pandoc-filters/docbook-writer/rst-roles.lua \ 16 - --lua-filter=build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.lua \ 17 - -f commonmark$(pandoc_commonmark_enabled_extensions)+smart 18 - 19 - .PHONY: all 20 - all: validate format out/html/index.html 21 - 22 - .PHONY: render-md 23 - render-md: ${MD_TARGETS} 24 - 25 - .PHONY: debug 26 - debug: 27 - nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml" 28 - 29 - .PHONY: format 30 - format: doc-support/result 31 - find . -iname '*.xml' -type f | while read f; do \ 32 - echo $$f ;\ 33 - xmlformat --config-file "doc-support/result/xmlformat.conf" -i $$f ;\ 34 - done 35 - 36 - .PHONY: fix-misc-xml 37 - fix-misc-xml: 38 - find . -iname '*.xml' -type f \ 39 - -exec ../nixos/doc/varlistentry-fixer.rb {} ';' 40 - 41 - .PHONY: clean 42 - clean: 43 - rm -f ${MD_TARGETS} doc-support/result .version manual-full.xml functions/library/locations.xml functions/library/generated 44 - rm -rf ./out/ ./highlightjs ./media 45 - 46 - .PHONY: validate 47 - validate: manual-full.xml doc-support/result 48 - jing doc-support/result/docbook.rng manual-full.xml 49 - 50 - out/html/index.html: doc-support/result manual-full.xml style.css highlightjs 51 - mkdir -p out/html 52 - xsltproc \ 53 - --nonet --xinclude \ 54 - --output $@ \ 55 - doc-support/result/xhtml.xsl \ 56 - ./manual-full.xml 57 - 58 - mkdir -p out/html/highlightjs/ 59 - cp -r highlightjs out/html/ 60 - 61 - cp -r $(pandoc_media_dir) out/html/ 62 - cp ./overrides.css out/html/ 63 - cp ./style.css out/html/style.css 64 - 65 - mkdir -p out/html/images/callouts 66 - cp doc-support/result/xsl/docbook/images/callouts/*.svg out/html/images/callouts/ 67 - chmod u+w -R out/html/ 68 - 69 - highlightjs: doc-support/result 70 - mkdir -p highlightjs 71 - cp -r doc-support/result/highlightjs/highlight.pack.js highlightjs/ 72 - cp -r doc-support/result/highlightjs/LICENSE highlightjs/ 73 - cp -r doc-support/result/highlightjs/mono-blue.css highlightjs/ 74 - cp -r doc-support/result/highlightjs/loader.js highlightjs/ 75 - 76 - 77 - manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml 78 - xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml 79 - 80 - .version: doc-support/result 81 - ln -rfs ./doc-support/result/version .version 82 - 83 - doc-support/result: doc-support/default.nix 84 - (cd doc-support; nix-build) 85 - 86 - functions/library/locations.xml: doc-support/result 87 - ln -rfs ./doc-support/result/function-locations.xml functions/library/locations.xml 88 - 89 - functions/library/generated: doc-support/result 90 - ln -rfs ./doc-support/result/function-docs functions/library/generated 91 - 92 - %.section.xml: %.section.md 93 - $(PANDOC) $^ -t docbook \ 94 - $(pandoc_flags) \ 95 - -o $@ 96 - 97 - %.chapter.xml: %.chapter.md 98 - $(PANDOC) $^ -t docbook \ 99 - --top-level-division=chapter \ 100 - $(pandoc_flags) \ 101 - -o $@
···
+12
doc/builders.md
···
··· 1 + # Builders {#part-builders} 2 + 3 + ```{=include=} chapters 4 + builders/fetchers.chapter.md 5 + builders/trivial-builders.chapter.md 6 + builders/testers.chapter.md 7 + builders/special.md 8 + builders/images.md 9 + hooks/index.md 10 + languages-frameworks/index.md 11 + builders/packages/index.md 12 + ```
+13
doc/builders/images.md
···
··· 1 + # Images {#chap-images} 2 + 3 + This chapter describes tools for creating various types of images. 4 + 5 + ```{=include=} sections 6 + images/appimagetools.section.md 7 + images/dockertools.section.md 8 + images/ocitools.section.md 9 + images/snaptools.section.md 10 + images/portableservice.section.md 11 + images/makediskimage.section.md 12 + images/binarycache.section.md 13 + ```
-15
doc/builders/images.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xi="http://www.w3.org/2001/XInclude" 3 - xml:id="chap-images"> 4 - <title>Images</title> 5 - <para> 6 - This chapter describes tools for creating various types of images. 7 - </para> 8 - <xi:include href="images/appimagetools.section.xml" /> 9 - <xi:include href="images/dockertools.section.xml" /> 10 - <xi:include href="images/ocitools.section.xml" /> 11 - <xi:include href="images/snaptools.section.xml" /> 12 - <xi:include href="images/portableservice.section.xml" /> 13 - <xi:include href="images/makediskimage.section.xml" /> 14 - <xi:include href="images/binarycache.section.xml" /> 15 - </chapter>
···
+1 -1
doc/builders/packages/dlib.section.md
··· 1 # DLib {#dlib} 2 3 - [DLib](http://dlib.net/) is a modern, C++-based toolkit which provides several machine learning algorithms. 4 5 ## Compiling without AVX support {#compiling-without-avx-support} 6
··· 1 # DLib {#dlib} 2 3 + [DLib](http://dlib.net/) is a modern, C++\-based toolkit which provides several machine learning algorithms. 4 5 ## Compiling without AVX support {#compiling-without-avx-support} 6
+27
doc/builders/packages/index.md
···
··· 1 + # Packages {#chap-packages} 2 + 3 + This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org. 4 + 5 + ```{=include=} sections 6 + citrix.section.md 7 + dlib.section.md 8 + eclipse.section.md 9 + elm.section.md 10 + emacs.section.md 11 + firefox.section.md 12 + fish.section.md 13 + fuse.section.md 14 + ibus.section.md 15 + kakoune.section.md 16 + linux.section.md 17 + locales.section.md 18 + etc-files.section.md 19 + nginx.section.md 20 + opengl.section.md 21 + shell-helpers.section.md 22 + steam.section.md 23 + cataclysm-dda.section.md 24 + urxvt.section.md 25 + weechat.section.md 26 + xorg.section.md 27 + ```
-29
doc/builders/packages/index.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xi="http://www.w3.org/2001/XInclude" 3 - xml:id="chap-packages"> 4 - <title>Packages</title> 5 - <para> 6 - This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org. 7 - </para> 8 - <xi:include href="citrix.section.xml" /> 9 - <xi:include href="dlib.section.xml" /> 10 - <xi:include href="eclipse.section.xml" /> 11 - <xi:include href="elm.section.xml" /> 12 - <xi:include href="emacs.section.xml" /> 13 - <xi:include href="firefox.section.xml" /> 14 - <xi:include href="fish.section.xml" /> 15 - <xi:include href="fuse.section.xml" /> 16 - <xi:include href="ibus.section.xml" /> 17 - <xi:include href="kakoune.section.xml" /> 18 - <xi:include href="linux.section.xml" /> 19 - <xi:include href="locales.section.xml" /> 20 - <xi:include href="etc-files.section.xml" /> 21 - <xi:include href="nginx.section.xml" /> 22 - <xi:include href="opengl.section.xml" /> 23 - <xi:include href="shell-helpers.section.xml" /> 24 - <xi:include href="steam.section.xml" /> 25 - <xi:include href="cataclysm-dda.section.xml" /> 26 - <xi:include href="urxvt.section.xml" /> 27 - <xi:include href="weechat.section.xml" /> 28 - <xi:include href="xorg.section.xml" /> 29 - </chapter>
···
+11
doc/builders/special.md
···
··· 1 + # Special builders {#chap-special} 2 + 3 + This chapter describes several special builders. 4 + 5 + ```{=include=} sections 6 + special/fhs-environments.section.md 7 + special/makesetuphook.section.md 8 + special/mkshell.section.md 9 + special/darwin-builder.section.md 10 + special/vm-tools.section.md 11 + ```
-13
doc/builders/special.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xi="http://www.w3.org/2001/XInclude" 3 - xml:id="chap-special"> 4 - <title>Special builders</title> 5 - <para> 6 - This chapter describes several special builders. 7 - </para> 8 - <xi:include href="special/fhs-environments.section.xml" /> 9 - <xi:include href="special/makesetuphook.section.xml" /> 10 - <xi:include href="special/mkshell.section.xml" /> 11 - <xi:include href="special/darwin-builder.section.xml" /> 12 - <xi:include href="special/vm-tools.section.xml" /> 13 - </chapter>
···
+10
doc/contributing.md
···
··· 1 + # Contributing to Nixpkgs {#part-contributing} 2 + 3 + ```{=include=} chapters 4 + contributing/quick-start.chapter.md 5 + contributing/coding-conventions.chapter.md 6 + contributing/submitting-changes.chapter.md 7 + contributing/vulnerability-roundup.chapter.md 8 + contributing/reviewing-contributions.chapter.md 9 + contributing/contributing-to-documentation.chapter.md 10 + ```
+16
doc/contributing/staging-workflow.dot
···
··· 1 + digraph { 2 + "small changes" [shape=none] 3 + "mass-rebuilds and other large changes" [shape=none] 4 + "critical security fixes" [shape=none] 5 + "broken staging-next fixes" [shape=none] 6 + 7 + "small changes" -> master 8 + "mass-rebuilds and other large changes" -> staging 9 + "critical security fixes" -> master 10 + "broken staging-next fixes" -> "staging-next" 11 + 12 + "staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"] 13 + "staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"] 14 + 15 + master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"] 16 + }
+102
doc/contributing/staging-workflow.svg
···
··· 1 + <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 + <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 3 + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 4 + <!-- Generated by graphviz version 7.1.0 (0) 5 + --> 6 + <!-- Pages: 1 --> 7 + <svg width="743pt" height="291pt" 8 + viewBox="0.00 0.00 743.00 291.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 9 + <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 287)"> 10 + <polygon fill="white" stroke="none" points="-4,4 -4,-287 739,-287 739,4 -4,4"/> 11 + <!-- small changes --> 12 + <g id="node1" class="node"> 13 + <title>small changes</title> 14 + <text text-anchor="middle" x="59" y="-261.3" font-family="Times,serif" font-size="14.00">small changes</text> 15 + </g> 16 + <!-- master --> 17 + <g id="node5" class="node"> 18 + <title>master</title> 19 + <ellipse fill="none" stroke="black" cx="139" cy="-192" rx="43.59" ry="18"/> 20 + <text text-anchor="middle" x="139" y="-188.3" font-family="Times,serif" font-size="14.00">master</text> 21 + </g> 22 + <!-- small changes&#45;&gt;master --> 23 + <g id="edge1" class="edge"> 24 + <title>small changes&#45;&gt;master</title> 25 + <path fill="none" stroke="black" d="M77.96,-247.17C88.42,-237.89 101.55,-226.23 112.96,-216.11"/> 26 + <polygon fill="black" stroke="black" points="114.99,-218.99 120.14,-209.74 110.34,-213.76 114.99,-218.99"/> 27 + </g> 28 + <!-- mass&#45;rebuilds and other large changes --> 29 + <g id="node2" class="node"> 30 + <title>mass&#45;rebuilds and other large changes</title> 31 + <text text-anchor="middle" x="588" y="-101.3" font-family="Times,serif" font-size="14.00">mass&#45;rebuilds and other large changes</text> 32 + </g> 33 + <!-- staging --> 34 + <g id="node6" class="node"> 35 + <title>staging</title> 36 + <ellipse fill="none" stroke="black" cx="438" cy="-18" rx="45.49" ry="18"/> 37 + <text text-anchor="middle" x="438" y="-14.3" font-family="Times,serif" font-size="14.00">staging</text> 38 + </g> 39 + <!-- mass&#45;rebuilds and other large changes&#45;&gt;staging --> 40 + <g id="edge2" class="edge"> 41 + <title>mass&#45;rebuilds and other large changes&#45;&gt;staging</title> 42 + <path fill="none" stroke="black" d="M587.48,-87.47C586.26,-76.55 582.89,-62.7 574,-54 553.19,-33.63 522.2,-24.65 495.05,-20.86"/> 43 + <polygon fill="black" stroke="black" points="495.53,-17.39 485.2,-19.71 494.72,-24.35 495.53,-17.39"/> 44 + </g> 45 + <!-- critical security fixes --> 46 + <g id="node3" class="node"> 47 + <title>critical security fixes</title> 48 + <text text-anchor="middle" x="219" y="-261.3" font-family="Times,serif" font-size="14.00">critical security fixes</text> 49 + </g> 50 + <!-- critical security fixes&#45;&gt;master --> 51 + <g id="edge3" class="edge"> 52 + <title>critical security fixes&#45;&gt;master</title> 53 + <path fill="none" stroke="black" d="M200.04,-247.17C189.58,-237.89 176.45,-226.23 165.04,-216.11"/> 54 + <polygon fill="black" stroke="black" points="167.66,-213.76 157.86,-209.74 163.01,-218.99 167.66,-213.76"/> 55 + </g> 56 + <!-- broken staging&#45;next fixes --> 57 + <g id="node4" class="node"> 58 + <title>broken staging&#45;next fixes</title> 59 + <text text-anchor="middle" x="414" y="-188.3" font-family="Times,serif" font-size="14.00">broken staging&#45;next fixes</text> 60 + </g> 61 + <!-- staging&#45;next --> 62 + <g id="node7" class="node"> 63 + <title>staging&#45;next</title> 64 + <ellipse fill="none" stroke="black" cx="272" cy="-105" rx="68.79" ry="18"/> 65 + <text text-anchor="middle" x="272" y="-101.3" font-family="Times,serif" font-size="14.00">staging&#45;next</text> 66 + </g> 67 + <!-- broken staging&#45;next fixes&#45;&gt;staging&#45;next --> 68 + <g id="edge4" class="edge"> 69 + <title>broken staging&#45;next fixes&#45;&gt;staging&#45;next</title> 70 + <path fill="none" stroke="black" d="M410.2,-174.42C406.88,-163.48 400.98,-149.62 391,-141 377.77,-129.56 360.96,-121.86 344.17,-116.67"/> 71 + <polygon fill="black" stroke="black" points="345.21,-113.33 334.63,-114.02 343.33,-120.07 345.21,-113.33"/> 72 + </g> 73 + <!-- master&#45;&gt;staging&#45;next --> 74 + <g id="edge7" class="edge"> 75 + <title>master&#45;&gt;staging&#45;next</title> 76 + <path fill="none" stroke="#5f5ee8" d="M96.55,-187.26C53.21,-181.83 -4.5,-169.14 20,-141 41.99,-115.74 126.36,-108.13 191.48,-106.11"/> 77 + <polygon fill="#5f5ee8" stroke="#5f5ee8" points="191.57,-109.61 201.47,-105.85 191.38,-102.62 191.57,-109.61"/> 78 + <text text-anchor="middle" x="133" y="-144.8" font-family="Times,serif" font-size="14.00" fill="#5f5ee8">every six hours (GitHub Action)</text> 79 + </g> 80 + <!-- staging&#45;&gt;staging&#45;next --> 81 + <g id="edge6" class="edge"> 82 + <title>staging&#45;&gt;staging&#45;next</title> 83 + <path fill="none" stroke="#e85eb0" d="M434.55,-36.2C431.48,-47.12 425.89,-60.72 416,-69 397.61,-84.41 373.51,-93.23 350.31,-98.23"/> 84 + <polygon fill="#e85eb0" stroke="#e85eb0" points="349.67,-94.79 340.5,-100.1 350.98,-101.66 349.67,-94.79"/> 85 + <text text-anchor="middle" x="493.5" y="-57.8" font-family="Times,serif" font-size="14.00" fill="#e85eb0">stabilization starts</text> 86 + </g> 87 + <!-- staging&#45;next&#45;&gt;master --> 88 + <g id="edge5" class="edge"> 89 + <title>staging&#45;next&#45;&gt;master</title> 90 + <path fill="none" stroke="#e85eb0" d="M268.22,-123.46C265.05,-134.22 259.46,-147.52 250,-156 233.94,-170.4 211.98,-178.87 191.83,-183.86"/> 91 + <polygon fill="#e85eb0" stroke="#e85eb0" points="191.35,-180.38 182.34,-185.96 192.86,-187.22 191.35,-180.38"/> 92 + <text text-anchor="middle" x="323.5" y="-144.8" font-family="Times,serif" font-size="14.00" fill="#e85eb0">stabilization ends</text> 93 + </g> 94 + <!-- staging&#45;next&#45;&gt;staging --> 95 + <g id="edge8" class="edge"> 96 + <title>staging&#45;next&#45;&gt;staging</title> 97 + <path fill="none" stroke="#5f5ee8" d="M221.07,-92.46C194.72,-84.14 170.92,-71.32 186,-54 210.78,-25.54 314.74,-19.48 381.15,-18.6"/> 98 + <polygon fill="#5f5ee8" stroke="#5f5ee8" points="380.79,-22.1 390.76,-18.51 380.73,-15.1 380.79,-22.1"/> 99 + <text text-anchor="middle" x="299" y="-57.8" font-family="Times,serif" font-size="14.00" fill="#5f5ee8">every six hours (GitHub Action)</text> 100 + </g> 101 + </g> 102 + </svg>
+5 -18
doc/contributing/submitting-changes.chapter.md
··· 214 - Hydra builds for master and staging should not be used as testing platform, it’s a build farm for changes that have been already tested. 215 - When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra. 216 217 - ```{.graphviz caption="Staging workflow"} 218 - digraph { 219 - "small changes" [shape=none] 220 - "mass-rebuilds and other large changes" [shape=none] 221 - "critical security fixes" [shape=none] 222 - "broken staging-next fixes" [shape=none] 223 - 224 - "small changes" -> master 225 - "mass-rebuilds and other large changes" -> staging 226 - "critical security fixes" -> master 227 - "broken staging-next fixes" -> "staging-next" 228 - 229 - "staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"] 230 - "staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"] 231 - 232 - master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"] 233 - } 234 - ``` 235 236 [This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours; these are the blue arrows in the diagram above. The purple arrows in the diagram above are done manually and much less frequently. You can get an idea of how often these merges occur by looking at the git history. 237
··· 214 - Hydra builds for master and staging should not be used as testing platform, it’s a build farm for changes that have been already tested. 215 - When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra. 216 217 + ::: {.figure #fig-staging-workflow} 218 + # Staging workflow 219 + <!-- generated from ./staging-workflow.dot using: dot -Tsvg staging-workflow.dot > staging-workflow.svg --> 220 + ![Staging workflow](./staging-workflow.svg) 221 + ::: 222 223 [This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours; these are the blue arrows in the diagram above. The purple arrows in the diagram above are done manually and much less frequently. You can get an idea of how often these merges occur by looking at the git history. 224
+33 -14
doc/default.nix
··· 47 name = "nixpkgs-manual"; 48 49 nativeBuildInputs = with pkgs; [ 50 - pandoc 51 - graphviz 52 - libxml2 53 - libxslt 54 - zip 55 - jing 56 - xmlformat 57 ]; 58 59 src = pkgs.nix-gitignore.gitignoreSource [] ./.; ··· 62 ln -s ${doc-support} ./doc-support/result 63 ''; 64 65 - preBuild = '' 66 - make -j$NIX_BUILD_CORES render-md 67 ''; 68 69 installPhase = '' 70 dest="$out/share/doc/nixpkgs" 71 mkdir -p "$(dirname "$dest")" 72 - mv out/html "$dest" 73 mv "$dest/index.html" "$dest/manual.html" 74 75 cp ${epub} "$dest/nixpkgs-manual.epub" ··· 78 echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products 79 echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products 80 ''; 81 - 82 - # Environment variables 83 - PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters"; 84 - PANDOC_LINK_MANPAGES_FILTER = import build-aux/pandoc-filters/link-manpages.nix { inherit pkgs; }; 85 }
··· 47 name = "nixpkgs-manual"; 48 49 nativeBuildInputs = with pkgs; [ 50 + nixos-render-docs 51 ]; 52 53 src = pkgs.nix-gitignore.gitignoreSource [] ./.; ··· 56 ln -s ${doc-support} ./doc-support/result 57 ''; 58 59 + buildPhase = '' 60 + cat \ 61 + ./functions/library.md.in \ 62 + ./doc-support/result/function-docs/index.md \ 63 + > ./functions/library.md 64 + substitute ./manual.md.in ./manual.md \ 65 + --replace '@MANUAL_VERSION@' '${pkgs.lib.version}' 66 + 67 + mkdir -p out/media 68 + 69 + mkdir -p out/highlightjs 70 + cp -t out/highlightjs \ 71 + ${pkgs.documentation-highlighter}/highlight.pack.js \ 72 + ${pkgs.documentation-highlighter}/LICENSE \ 73 + ${pkgs.documentation-highlighter}/mono-blue.css \ 74 + ${pkgs.documentation-highlighter}/loader.js 75 + 76 + cp -t out ./overrides.css ./style.css 77 + 78 + nixos-render-docs manual html \ 79 + --manpage-urls ./manpage-urls.json \ 80 + --revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \ 81 + --stylesheet style.css \ 82 + --stylesheet overrides.css \ 83 + --stylesheet highlightjs/mono-blue.css \ 84 + --script ./highlightjs/highlight.pack.js \ 85 + --script ./highlightjs/loader.js \ 86 + --toc-depth 1 \ 87 + --section-toc-depth 1 \ 88 + manual.md \ 89 + out/index.html 90 ''; 91 92 installPhase = '' 93 dest="$out/share/doc/nixpkgs" 94 mkdir -p "$(dirname "$dest")" 95 + mv out "$dest" 96 mv "$dest/index.html" "$dest/manual.html" 97 98 cp ${epub} "$dest/nixpkgs-manual.epub" ··· 101 echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products 102 echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products 103 ''; 104 }
+1 -4
doc/doc-support/default.nix
··· 69 ( 70 cd result 71 ln -s ${functionDocs} ./function-docs 72 - ln -s ${optionsDoc.optionsDocBook} ./config-options.docbook.xml 73 74 ln -s ${pkgs.docbook5}/xml/rng/docbook/docbook.rng ./docbook.rng 75 ln -s ${pkgs.docbook_xsl_ns}/xml/xsl ./xsl ··· 77 ln -s ${xhtml-xsl} ./xhtml.xsl 78 79 ln -s ${./xmlformat.conf} ./xmlformat.conf 80 - ln -s ${pkgs.documentation-highlighter} ./highlightjs 81 - 82 - echo -n "${version}" > ./version 83 ) 84 mv result $out 85 ''
··· 69 ( 70 cd result 71 ln -s ${functionDocs} ./function-docs 72 + ln -s ${optionsDoc.optionsJSON} ./config-options.json 73 74 ln -s ${pkgs.docbook5}/xml/rng/docbook/docbook.rng ./docbook.rng 75 ln -s ${pkgs.docbook_xsl_ns}/xml/xsl ./xsl ··· 77 ln -s ${xhtml-xsl} ./xhtml.xsl 78 79 ln -s ${./xmlformat.conf} ./xmlformat.conf 80 ) 81 mv result $out 82 ''
+7 -10
doc/doc-support/lib-function-docs.nix
··· 5 with pkgs; 6 7 let 8 - locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; }; 9 in 10 stdenv.mkDerivation { 11 name = "nixpkgs-lib-docs"; ··· 16 function docgen { 17 # TODO: wrap lib.$1 in <literal>, make nixdoc not escape it 18 if [[ -e "../lib/$1.nix" ]]; then 19 - nixdoc -c "$1" -d "lib.$1: $2" -f "$1.nix" > "$out/$1.xml" 20 else 21 - nixdoc -c "$1" -d "lib.$1: $2" -f "$1/default.nix" > "$out/$1.xml" 22 fi 23 - echo "<xi:include href='$1.xml' />" >> "$out/index.xml" 24 } 25 26 mkdir -p "$out" 27 28 - cat > "$out/index.xml" << 'EOF' 29 - <?xml version="1.0" encoding="utf-8"?> 30 - <root xmlns:xi="http://www.w3.org/2001/XInclude"> 31 EOF 32 33 ${lib.concatMapStrings ({ name, description }: '' 34 docgen ${name} ${lib.escapeShellArg description} 35 '') libsets} 36 37 - echo "</root>" >> "$out/index.xml" 38 - 39 - ln -s ${locationsXml} $out/locations.xml 40 ''; 41 }
··· 5 with pkgs; 6 7 let 8 + locationsJSON = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; }; 9 in 10 stdenv.mkDerivation { 11 name = "nixpkgs-lib-docs"; ··· 16 function docgen { 17 # TODO: wrap lib.$1 in <literal>, make nixdoc not escape it 18 if [[ -e "../lib/$1.nix" ]]; then 19 + nixdoc -c "$1" -d "lib.$1: $2" -l ${locationsJSON} -f "$1.nix" > "$out/$1.md" 20 else 21 + nixdoc -c "$1" -d "lib.$1: $2" -l ${locationsJSON} -f "$1/default.nix" > "$out/$1.md" 22 fi 23 + echo "$out/$1.md" >> "$out/index.md" 24 } 25 26 mkdir -p "$out" 27 28 + cat > "$out/index.md" << 'EOF' 29 + ```{=include=} sections 30 EOF 31 32 ${lib.concatMapStrings ({ name, description }: '' 33 docgen ${name} ${lib.escapeShellArg description} 34 '') libsets} 35 36 + echo '```' >> "$out/index.md" 37 ''; 38 }
+14 -24
doc/doc-support/lib-function-locations.nix
··· 58 [ "-prime" ]; 59 60 urlPrefix = "https://github.com/NixOS/nixpkgs/blob/${revision}"; 61 - xmlstrings = (nixpkgsLib.strings.concatMapStrings 62 - ({ name, value }: 63 - '' 64 - <section><title>${name}</title> 65 - <para xml:id="${sanitizeId name}"> 66 - Located at 67 - <link 68 - xlink:href="${urlPrefix}/${value.file}#L${builtins.toString value.line}">${value.file}:${builtins.toString value.line}</link> 69 - in <literal>&lt;nixpkgs&gt;</literal>. 70 - </para> 71 - </section> 72 - '') 73 - relativeLocs); 74 75 - in pkgs.writeText 76 - "locations.xml" 77 - '' 78 - <section xmlns="http://docbook.org/ns/docbook" 79 - xmlns:xlink="http://www.w3.org/1999/xlink" 80 - version="5"> 81 - <title>All the locations for every lib function</title> 82 - <para>This file is only for inclusion by other files.</para> 83 - ${xmlstrings} 84 - </section> 85 - ''
··· 58 [ "-prime" ]; 59 60 urlPrefix = "https://github.com/NixOS/nixpkgs/blob/${revision}"; 61 + jsonLocs = builtins.listToAttrs 62 + (builtins.map 63 + ({ name, value }: { 64 + name = sanitizeId name; 65 + value = 66 + let 67 + text = "${value.file}:${builtins.toString value.line}"; 68 + target = "${urlPrefix}/${value.file}#L${builtins.toString value.line}"; 69 + in 70 + "[${text}](${target}) in `<nixpkgs>`"; 71 + }) 72 + relativeLocs); 73 74 + in 75 + pkgs.writeText "locations.json" (builtins.toJSON jsonLocs)
+11
doc/functions.md
···
··· 1 + # Functions reference {#chap-functions} 2 + 3 + The nixpkgs repository has several utility functions to manipulate Nix expressions. 4 + 5 + ```{=include=} sections 6 + functions/library.md 7 + functions/generators.section.md 8 + functions/debug.section.md 9 + functions/prefer-remote-fetch.section.md 10 + functions/nix-gitignore.section.md 11 + ```
-14
doc/functions.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xlink="http://www.w3.org/1999/xlink" 3 - xmlns:xi="http://www.w3.org/2001/XInclude" 4 - xml:id="chap-functions"> 5 - <title>Functions reference</title> 6 - <para> 7 - The nixpkgs repository has several utility functions to manipulate Nix expressions. 8 - </para> 9 - <xi:include href="functions/library.xml" /> 10 - <xi:include href="functions/generators.section.xml" /> 11 - <xi:include href="functions/debug.section.xml" /> 12 - <xi:include href="functions/prefer-remote-fetch.section.xml" /> 13 - <xi:include href="functions/nix-gitignore.section.xml" /> 14 - </chapter>
···
+5
doc/functions/library.md.in
···
··· 1 + # Nixpkgs Library Functions {#sec-functions-library} 2 + 3 + Nixpkgs provides a standard library at `pkgs.lib`, or through `import <nixpkgs/lib>`. 4 + 5 + <!-- nixdoc-generated documentation must be appended here during build! -->
-14
doc/functions/library.xml
··· 1 - <section xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xlink="http://www.w3.org/1999/xlink" 3 - xmlns:xi="http://www.w3.org/2001/XInclude" 4 - xml:id="sec-functions-library"> 5 - <title>Nixpkgs Library Functions</title> 6 - 7 - <para> 8 - Nixpkgs provides a standard library at <varname>pkgs.lib</varname>, or through <code>import &lt;nixpkgs/lib&gt;</code>. 9 - </para> 10 - 11 - <!-- The index must have a root element to declare namespaces, but we 12 - don't want to include it, so we select all of its children. --> 13 - <xi:include href="./library/generated/index.xml" xpointer="xpointer(/root/*)" /> 14 - </section>
···
+33
doc/hooks/index.md
···
··· 1 + # Hooks reference {#chap-hooks} 2 + 3 + Nixpkgs has several hook packages that augment the stdenv phases. 4 + 5 + The stdenv built-in hooks are documented in [](#ssec-setup-hooks). 6 + 7 + ```{=include=} sections 8 + autoconf.section.md 9 + automake.section.md 10 + autopatchelf.section.md 11 + breakpoint.section.md 12 + cmake.section.md 13 + gdk-pixbuf.section.md 14 + ghc.section.md 15 + gnome.section.md 16 + installShellFiles.section.md 17 + libiconv.section.md 18 + libxml2.section.md 19 + meson.section.md 20 + ninja.section.md 21 + patch-rc-path-hooks.section.md 22 + perl.section.md 23 + pkg-config.section.md 24 + postgresql-test-hook.section.md 25 + python.section.md 26 + qt-4.section.md 27 + scons.section.md 28 + tetex-tex-live.section.md 29 + unzip.section.md 30 + validatePkgConfig.section.md 31 + waf.section.md 32 + xcbuild.section.md 33 + ```
-37
doc/hooks/index.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xlink="http://www.w3.org/1999/xlink" 3 - xmlns:xi="http://www.w3.org/2001/XInclude" 4 - xml:id="chap-hooks"> 5 - <title>Hooks reference</title> 6 - <para> 7 - Nixpkgs has several hook packages that augment the stdenv phases. 8 - </para> 9 - <para> 10 - The stdenv built-in hooks are documented in <xref linkend="ssec-setup-hooks"/>. 11 - </para> 12 - <xi:include href="./autoconf.section.xml" /> 13 - <xi:include href="./automake.section.xml" /> 14 - <xi:include href="./autopatchelf.section.xml" /> 15 - <xi:include href="./breakpoint.section.xml" /> 16 - <xi:include href="./cmake.section.xml" /> 17 - <xi:include href="./gdk-pixbuf.section.xml" /> 18 - <xi:include href="./ghc.section.xml" /> 19 - <xi:include href="./gnome.section.xml" /> 20 - <xi:include href="./installShellFiles.section.xml" /> 21 - <xi:include href="./libiconv.section.xml" /> 22 - <xi:include href="./libxml2.section.xml" /> 23 - <xi:include href="./meson.section.xml" /> 24 - <xi:include href="./ninja.section.xml" /> 25 - <xi:include href="./patch-rc-path-hooks.section.xml" /> 26 - <xi:include href="./perl.section.xml" /> 27 - <xi:include href="./pkg-config.section.xml" /> 28 - <xi:include href="./postgresql-test-hook.section.xml" /> 29 - <xi:include href="./python.section.xml" /> 30 - <xi:include href="./qt-4.section.xml" /> 31 - <xi:include href="./scons.section.xml" /> 32 - <xi:include href="./tetex-tex-live.section.xml" /> 33 - <xi:include href="./unzip.section.xml" /> 34 - <xi:include href="./validatePkgConfig.section.xml" /> 35 - <xi:include href="./waf.section.xml" /> 36 - <xi:include href="./xcbuild.section.xml" /> 37 - </chapter>
···
+45
doc/languages-frameworks/index.md
···
··· 1 + # Languages and frameworks {#chap-language-support} 2 + 3 + The [standard build environment](#chap-stdenv) makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accommodated by overriding the appropriate phases of `stdenv`. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter. 4 + 5 + ```{=include=} sections 6 + agda.section.md 7 + android.section.md 8 + beam.section.md 9 + bower.section.md 10 + chicken.section.md 11 + coq.section.md 12 + crystal.section.md 13 + cuda.section.md 14 + cuelang.section.md 15 + dart.section.md 16 + dhall.section.md 17 + dotnet.section.md 18 + emscripten.section.md 19 + gnome.section.md 20 + go.section.md 21 + haskell.section.md 22 + hy.section.md 23 + idris.section.md 24 + ios.section.md 25 + java.section.md 26 + javascript.section.md 27 + lisp.section.md 28 + lua.section.md 29 + maven.section.md 30 + nim.section.md 31 + ocaml.section.md 32 + octave.section.md 33 + perl.section.md 34 + php.section.md 35 + pkg-config.section.md 36 + python.section.md 37 + qt.section.md 38 + r.section.md 39 + ruby.section.md 40 + rust.section.md 41 + swift.section.md 42 + texlive.section.md 43 + titanium.section.md 44 + vim.section.md 45 + ```
-47
doc/languages-frameworks/index.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xi="http://www.w3.org/2001/XInclude" 3 - xml:id="chap-language-support"> 4 - <title>Languages and frameworks</title> 5 - <para> 6 - The <link linkend="chap-stdenv">standard build environment</link> makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accommodated by overriding the appropriate phases of <literal>stdenv</literal>. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter. 7 - </para> 8 - <xi:include href="agda.section.xml" /> 9 - <xi:include href="android.section.xml" /> 10 - <xi:include href="beam.section.xml" /> 11 - <xi:include href="bower.section.xml" /> 12 - <xi:include href="chicken.section.xml" /> 13 - <xi:include href="coq.section.xml" /> 14 - <xi:include href="crystal.section.xml" /> 15 - <xi:include href="cuda.section.xml" /> 16 - <xi:include href="cuelang.section.xml" /> 17 - <xi:include href="dart.section.xml" /> 18 - <xi:include href="dhall.section.xml" /> 19 - <xi:include href="dotnet.section.xml" /> 20 - <xi:include href="emscripten.section.xml" /> 21 - <xi:include href="gnome.section.xml" /> 22 - <xi:include href="go.section.xml" /> 23 - <xi:include href="haskell.section.xml" /> 24 - <xi:include href="hy.section.xml" /> 25 - <xi:include href="idris.section.xml" /> 26 - <xi:include href="ios.section.xml" /> 27 - <xi:include href="java.section.xml" /> 28 - <xi:include href="javascript.section.xml" /> 29 - <xi:include href="lisp.section.xml" /> 30 - <xi:include href="lua.section.xml" /> 31 - <xi:include href="maven.section.xml" /> 32 - <xi:include href="nim.section.xml" /> 33 - <xi:include href="ocaml.section.xml" /> 34 - <xi:include href="octave.section.xml" /> 35 - <xi:include href="perl.section.xml" /> 36 - <xi:include href="php.section.xml" /> 37 - <xi:include href="pkg-config.section.xml" /> 38 - <xi:include href="python.section.xml" /> 39 - <xi:include href="qt.section.xml" /> 40 - <xi:include href="r.section.xml" /> 41 - <xi:include href="ruby.section.xml" /> 42 - <xi:include href="rust.section.xml" /> 43 - <xi:include href="swift.section.xml" /> 44 - <xi:include href="texlive.section.xml" /> 45 - <xi:include href="titanium.section.xml" /> 46 - <xi:include href="vim.section.xml" /> 47 - </chapter>
···
+6
doc/lib.md
···
··· 1 + # Nixpkgs `lib` {#id-1.4} 2 + 3 + ```{=include=} chapters 4 + functions.md 5 + module-system/module-system.chapter.md 6 + ```
+14
doc/manual.md.in
···
··· 1 + # Nixpkgs Manual {#nixpkgs-manual} 2 + ## Version @MANUAL_VERSION@ 3 + 4 + ```{=include=} chapters 5 + preface.chapter.md 6 + ``` 7 + 8 + ```{=include=} parts 9 + using-nixpkgs.md 10 + lib.md 11 + stdenv.md 12 + builders.md 13 + contributing.md 14 + ```
-49
doc/manual.xml
··· 1 - <book xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xi="http://www.w3.org/2001/XInclude" 3 - xml:id="nixpkgs-manual"> 4 - <info> 5 - <title>Nixpkgs Manual</title> 6 - <subtitle>Version <xi:include href=".version" parse="text" /> 7 - </subtitle> 8 - </info> 9 - <xi:include href="preface.chapter.xml" /> 10 - <part xml:id="part-using"> 11 - <title>Using Nixpkgs</title> 12 - <xi:include href="using/configuration.chapter.xml" /> 13 - <xi:include href="using/overlays.chapter.xml" /> 14 - <xi:include href="using/overrides.chapter.xml" /> 15 - </part> 16 - <part> 17 - <title>Nixpkgs <code>lib</code></title> 18 - <xi:include href="functions.xml" /> 19 - <xi:include href="module-system/module-system.chapter.xml" /> 20 - </part> 21 - <part xml:id="part-stdenv"> 22 - <title>Standard environment</title> 23 - <xi:include href="stdenv/stdenv.chapter.xml" /> 24 - <xi:include href="stdenv/meta.chapter.xml" /> 25 - <xi:include href="stdenv/multiple-output.chapter.xml" /> 26 - <xi:include href="stdenv/cross-compilation.chapter.xml" /> 27 - <xi:include href="stdenv/platform-notes.chapter.xml" /> 28 - </part> 29 - <part xml:id="part-builders"> 30 - <title>Builders</title> 31 - <xi:include href="builders/fetchers.chapter.xml" /> 32 - <xi:include href="builders/trivial-builders.chapter.xml" /> 33 - <xi:include href="builders/testers.chapter.xml" /> 34 - <xi:include href="builders/special.xml" /> 35 - <xi:include href="builders/images.xml" /> 36 - <xi:include href="hooks/index.xml" /> 37 - <xi:include href="languages-frameworks/index.xml" /> 38 - <xi:include href="builders/packages/index.xml" /> 39 - </part> 40 - <part xml:id="part-contributing"> 41 - <title>Contributing to Nixpkgs</title> 42 - <xi:include href="contributing/quick-start.chapter.xml" /> 43 - <xi:include href="contributing/coding-conventions.chapter.xml" /> 44 - <xi:include href="contributing/submitting-changes.chapter.xml" /> 45 - <xi:include href="contributing/vulnerability-roundup.chapter.xml" /> 46 - <xi:include href="contributing/reviewing-contributions.chapter.xml" /> 47 - <xi:include href="contributing/contributing-to-documentation.chapter.xml" /> 48 - </part> 49 - </book>
···
+9
doc/stdenv.md
···
··· 1 + # Standard environment {#part-stdenv} 2 + 3 + ```{=include=} chapters 4 + stdenv/stdenv.chapter.md 5 + stdenv/meta.chapter.md 6 + stdenv/multiple-output.chapter.md 7 + stdenv/cross-compilation.chapter.md 8 + stdenv/platform-notes.chapter.md 9 + ```
+3 -8
doc/stdenv/stdenv.chapter.md
··· 464 465 If the returned array contains exactly one object (e.g. `[{}]`), all values are optional and will be determined automatically. 466 467 - ```{=docbook} 468 - <example> 469 - <title>Standard output of an update script using commit feature</title> 470 - ``` 471 472 ```json 473 [ ··· 481 } 482 ] 483 ``` 484 - 485 - ```{=docbook} 486 - </example> 487 - ``` 488 489 ### Recursive attributes in `mkDerivation` {#mkderivation-recursive-attributes} 490
··· 464 465 If the returned array contains exactly one object (e.g. `[{}]`), all values are optional and will be determined automatically. 466 467 + ::: {.example #var-passthru-updateScript-example-commit} 468 + # Standard output of an update script using commit feature 469 470 ```json 471 [ ··· 479 } 480 ] 481 ``` 482 + ::: 483 484 ### Recursive attributes in `mkDerivation` {#mkderivation-recursive-attributes} 485
+7
doc/using-nixpkgs.md
···
··· 1 + # Using Nixpkgs {#part-using} 2 + 3 + ```{=include=} chapters 4 + using/configuration.chapter.md 5 + using/overlays.chapter.md 6 + using/overrides.chapter.md 7 + ```
+4 -2
doc/using/configuration.chapter.md
··· 185 186 The following attributes can be passed in [`config`](#chap-packageconfig). 187 188 - ```{=docbook} 189 - <include xmlns="http://www.w3.org/2001/XInclude" href="../doc-support/result/config-options.docbook.xml"/> 190 ``` 191 192
··· 185 186 The following attributes can be passed in [`config`](#chap-packageconfig). 187 188 + ```{=include=} options 189 + id-prefix: opt- 190 + list-id: configuration-variable-list 191 + source: ../doc-support/result/config-options.json/share/doc/nixos/options.json 192 ``` 193 194
-309
pkgs/tools/nix/nixdoc/Cargo.lock
··· 1 - [[package]] 2 - name = "ansi_term" 3 - version = "0.11.0" 4 - source = "registry+https://github.com/rust-lang/crates.io-index" 5 - dependencies = [ 6 - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 7 - ] 8 - 9 - [[package]] 10 - name = "arenatree" 11 - version = "0.1.1" 12 - source = "git+https://gitlab.com/jD91mZM2/arenatree#f9bf7efa9a5ef4c2dd9e2acc5a4cc79a987cb648" 13 - 14 - [[package]] 15 - name = "arrayvec" 16 - version = "0.4.7" 17 - source = "registry+https://github.com/rust-lang/crates.io-index" 18 - dependencies = [ 19 - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 20 - ] 21 - 22 - [[package]] 23 - name = "atty" 24 - version = "0.2.11" 25 - source = "registry+https://github.com/rust-lang/crates.io-index" 26 - dependencies = [ 27 - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 28 - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 29 - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 30 - ] 31 - 32 - [[package]] 33 - name = "backtrace" 34 - version = "0.3.9" 35 - source = "registry+https://github.com/rust-lang/crates.io-index" 36 - dependencies = [ 37 - "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", 38 - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 39 - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 40 - "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 41 - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 42 - ] 43 - 44 - [[package]] 45 - name = "backtrace-sys" 46 - version = "0.1.24" 47 - source = "registry+https://github.com/rust-lang/crates.io-index" 48 - dependencies = [ 49 - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", 50 - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 51 - ] 52 - 53 - [[package]] 54 - name = "bitflags" 55 - version = "1.0.4" 56 - source = "registry+https://github.com/rust-lang/crates.io-index" 57 - 58 - [[package]] 59 - name = "cc" 60 - version = "1.0.25" 61 - source = "registry+https://github.com/rust-lang/crates.io-index" 62 - 63 - [[package]] 64 - name = "cfg-if" 65 - version = "0.1.6" 66 - source = "registry+https://github.com/rust-lang/crates.io-index" 67 - 68 - [[package]] 69 - name = "clap" 70 - version = "2.32.0" 71 - source = "registry+https://github.com/rust-lang/crates.io-index" 72 - dependencies = [ 73 - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 74 - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 75 - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 76 - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 77 - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 78 - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 79 - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 80 - ] 81 - 82 - [[package]] 83 - name = "failure" 84 - version = "0.1.3" 85 - source = "registry+https://github.com/rust-lang/crates.io-index" 86 - dependencies = [ 87 - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 88 - "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 89 - ] 90 - 91 - [[package]] 92 - name = "failure_derive" 93 - version = "0.1.3" 94 - source = "registry+https://github.com/rust-lang/crates.io-index" 95 - dependencies = [ 96 - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", 97 - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 98 - "syn 0.15.15 (registry+https://github.com/rust-lang/crates.io-index)", 99 - "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 100 - ] 101 - 102 - [[package]] 103 - name = "libc" 104 - version = "0.2.43" 105 - source = "registry+https://github.com/rust-lang/crates.io-index" 106 - 107 - [[package]] 108 - name = "nixdoc" 109 - version = "1.0.1" 110 - dependencies = [ 111 - "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 112 - "rnix 0.4.1 (git+https://gitlab.com/jD91mZM2/rnix.git?rev=10b86c94291b4864470158ef8750de85ddd8d4ba)", 113 - "structopt 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 114 - "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 115 - ] 116 - 117 - [[package]] 118 - name = "nodrop" 119 - version = "0.1.12" 120 - source = "registry+https://github.com/rust-lang/crates.io-index" 121 - 122 - [[package]] 123 - name = "proc-macro2" 124 - version = "0.4.20" 125 - source = "registry+https://github.com/rust-lang/crates.io-index" 126 - dependencies = [ 127 - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 128 - ] 129 - 130 - [[package]] 131 - name = "quote" 132 - version = "0.6.8" 133 - source = "registry+https://github.com/rust-lang/crates.io-index" 134 - dependencies = [ 135 - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", 136 - ] 137 - 138 - [[package]] 139 - name = "redox_syscall" 140 - version = "0.1.40" 141 - source = "registry+https://github.com/rust-lang/crates.io-index" 142 - 143 - [[package]] 144 - name = "redox_termios" 145 - version = "0.1.1" 146 - source = "registry+https://github.com/rust-lang/crates.io-index" 147 - dependencies = [ 148 - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 149 - ] 150 - 151 - [[package]] 152 - name = "rnix" 153 - version = "0.4.1" 154 - source = "git+https://gitlab.com/jD91mZM2/rnix.git?rev=10b86c94291b4864470158ef8750de85ddd8d4ba#10b86c94291b4864470158ef8750de85ddd8d4ba" 155 - dependencies = [ 156 - "arenatree 0.1.1 (git+https://gitlab.com/jD91mZM2/arenatree)", 157 - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", 158 - "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 159 - "smol_str 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 160 - ] 161 - 162 - [[package]] 163 - name = "rustc-demangle" 164 - version = "0.1.9" 165 - source = "registry+https://github.com/rust-lang/crates.io-index" 166 - 167 - [[package]] 168 - name = "smol_str" 169 - version = "0.1.7" 170 - source = "registry+https://github.com/rust-lang/crates.io-index" 171 - 172 - [[package]] 173 - name = "strsim" 174 - version = "0.7.0" 175 - source = "registry+https://github.com/rust-lang/crates.io-index" 176 - 177 - [[package]] 178 - name = "structopt" 179 - version = "0.2.12" 180 - source = "registry+https://github.com/rust-lang/crates.io-index" 181 - dependencies = [ 182 - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", 183 - "structopt-derive 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 184 - ] 185 - 186 - [[package]] 187 - name = "structopt-derive" 188 - version = "0.2.12" 189 - source = "registry+https://github.com/rust-lang/crates.io-index" 190 - dependencies = [ 191 - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", 192 - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 193 - "syn 0.15.15 (registry+https://github.com/rust-lang/crates.io-index)", 194 - ] 195 - 196 - [[package]] 197 - name = "syn" 198 - version = "0.15.15" 199 - source = "registry+https://github.com/rust-lang/crates.io-index" 200 - dependencies = [ 201 - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", 202 - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 203 - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 204 - ] 205 - 206 - [[package]] 207 - name = "synstructure" 208 - version = "0.10.1" 209 - source = "registry+https://github.com/rust-lang/crates.io-index" 210 - dependencies = [ 211 - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", 212 - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 213 - "syn 0.15.15 (registry+https://github.com/rust-lang/crates.io-index)", 214 - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 215 - ] 216 - 217 - [[package]] 218 - name = "termion" 219 - version = "1.5.1" 220 - source = "registry+https://github.com/rust-lang/crates.io-index" 221 - dependencies = [ 222 - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 223 - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 224 - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 225 - ] 226 - 227 - [[package]] 228 - name = "textwrap" 229 - version = "0.10.0" 230 - source = "registry+https://github.com/rust-lang/crates.io-index" 231 - dependencies = [ 232 - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 233 - ] 234 - 235 - [[package]] 236 - name = "unicode-width" 237 - version = "0.1.5" 238 - source = "registry+https://github.com/rust-lang/crates.io-index" 239 - 240 - [[package]] 241 - name = "unicode-xid" 242 - version = "0.1.0" 243 - source = "registry+https://github.com/rust-lang/crates.io-index" 244 - 245 - [[package]] 246 - name = "vec_map" 247 - version = "0.8.1" 248 - source = "registry+https://github.com/rust-lang/crates.io-index" 249 - 250 - [[package]] 251 - name = "winapi" 252 - version = "0.3.6" 253 - source = "registry+https://github.com/rust-lang/crates.io-index" 254 - dependencies = [ 255 - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 256 - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 257 - ] 258 - 259 - [[package]] 260 - name = "winapi-i686-pc-windows-gnu" 261 - version = "0.4.0" 262 - source = "registry+https://github.com/rust-lang/crates.io-index" 263 - 264 - [[package]] 265 - name = "winapi-x86_64-pc-windows-gnu" 266 - version = "0.4.0" 267 - source = "registry+https://github.com/rust-lang/crates.io-index" 268 - 269 - [[package]] 270 - name = "xml-rs" 271 - version = "0.8.0" 272 - source = "registry+https://github.com/rust-lang/crates.io-index" 273 - 274 - [metadata] 275 - "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 276 - "checksum arenatree 0.1.1 (git+https://gitlab.com/jD91mZM2/arenatree)" = "<none>" 277 - "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" 278 - "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 279 - "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" 280 - "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" 281 - "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 282 - "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" 283 - "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 284 - "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" 285 - "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" 286 - "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" 287 - "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" 288 - "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" 289 - "checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" 290 - "checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" 291 - "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" 292 - "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 293 - "checksum rnix 0.4.1 (git+https://gitlab.com/jD91mZM2/rnix.git?rev=10b86c94291b4864470158ef8750de85ddd8d4ba)" = "<none>" 294 - "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" 295 - "checksum smol_str 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f3ed6f19b800d76574926e458d5f8e2dbea86c2b58c08d33a982448f09ac8d0c" 296 - "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" 297 - "checksum structopt 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d77af7242f18c40fd19cb270985930f239ee1646cfb482050bbae9da1d18743b" 298 - "checksum structopt-derive 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "17ff01fe96de9d16e7372ae5f19dd7ece2c703b51043c3db9ea27f9e393ea311" 299 - "checksum syn 0.15.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0a9c2bf1e53c21704a7cce1b2a42768f1ae32a6777108a0d7f1faa4bfe7f7c04" 300 - "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" 301 - "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 302 - "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" 303 - "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 304 - "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 305 - "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 306 - "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 307 - "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 308 - "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 309 - "checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5"
···
+6 -20
pkgs/tools/nix/nixdoc/default.nix
··· 2 3 rustPlatform.buildRustPackage rec { 4 pname = "nixdoc"; 5 - version = "1.0.1"; 6 7 src = fetchFromGitHub { 8 - owner = "tazjin"; 9 repo = "nixdoc"; 10 rev = "v${version}"; 11 - sha256 = "14d4dq06jdqazxvv7fq5872zy0capxyb0fdkp8qg06gxl1iw201s"; 12 }; 13 14 - patches = [ 15 - # Support nested identifiers https://github.com/nix-community/nixdoc/pull/27 16 - (fetchpatch { 17 - url = "https://github.com/nix-community/nixdoc/pull/27/commits/ea542735bf675fe2ccd37edaffb9138d1a8c1b7e.patch"; 18 - sha256 = "1fmz44jv2r9qsnjxvkkjfb0safy69l4x4vx1g5gisrp8nwdn94rj"; 19 - }) 20 - ]; 21 22 buildInputs = lib.optionals stdenv.isDarwin [ darwin.Security ]; 23 24 - cargoLock = { 25 - lockFile = ./Cargo.lock; 26 - outputHashes = { 27 - "arenatree-0.1.1" = "sha256-b3VVbYnWsjSjFMxvkfpJt13u+VC6baOIWD4qm1Gco4Q="; 28 - "rnix-0.4.1" = "sha256-C1L/qXk6AimH7COrBlqpUA3giftaOYm/qNxs7rQgETA="; 29 - }; 30 - }; 31 - 32 meta = with lib; { 33 description = "Generate documentation for Nix functions"; 34 - homepage = "https://github.com/tazjin/nixdoc"; 35 license = [ licenses.gpl3 ]; 36 - maintainers = [ maintainers.tazjin ]; 37 platforms = platforms.unix; 38 }; 39 }
··· 2 3 rustPlatform.buildRustPackage rec { 4 pname = "nixdoc"; 5 + version = "2.3.0"; 6 7 src = fetchFromGitHub { 8 + owner = "nix-community"; 9 repo = "nixdoc"; 10 rev = "v${version}"; 11 + sha256 = "sha256-8pp6xlmdb3kZ6unTiO4yRruyEZ//GIHZF1k8f4kQr9Q="; 12 }; 13 14 + cargoSha256 = "sha256-k8/+BBMjQCsrgCi33fTdiSukaAZlg6XU3NwXaJdGYVw="; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ darwin.Security ]; 17 18 meta = with lib; { 19 description = "Generate documentation for Nix functions"; 20 + homepage = "https://github.com/nix-community/nixdoc"; 21 license = [ licenses.gpl3 ]; 22 + maintainers = [ maintainers.asymmetric ]; 23 platforms = platforms.unix; 24 }; 25 }