···11---[[22-Converts Code AST nodes produced by pandoc’s DocBook reader33-from citerefentry elements into AST for corresponding role44-for reStructuredText.55-66-We use subset of MyST syntax (CommonMark with features from rST)77-so let’s use the rST AST for rST features.88-99-Reference: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage1010-]]1111-1212-function Code(elem)1313- elem.classes = elem.classes:map(function (x)1414- if x == 'citerefentry' then1515- elem.attributes['role'] = 'manpage'1616- return 'interpreted-text'1717- else1818- return x1919- end2020- end)2121-2222- return elem2323-end
···11---[[22-Converts Link AST nodes with empty label to DocBook xref elements.33-44-This is a temporary script to be able use cross-references conveniently55-using syntax taken from MyST, while we still use docbook-xsl66-for generating the documentation.77-88-Reference: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing99-]]1010-1111-local function starts_with(start, str)1212- return str:sub(1, #start) == start1313-end1414-1515-local function escape_xml_arg(arg)1616- amps = arg:gsub('&', '&')1717- amps_quotes = amps:gsub('"', '"')1818- amps_quotes_lt = amps_quotes:gsub('<', '<')1919-2020- return amps_quotes_lt2121-end2222-2323-function Link(elem)2424- has_no_content = #elem.content == 02525- targets_anchor = starts_with('#', elem.target)2626- has_no_attributes = elem.title == '' and elem.identifier == '' and #elem.classes == 0 and #elem.attributes == 02727-2828- if has_no_content and targets_anchor and has_no_attributes then2929- -- xref expects idref without the pound-sign3030- target_without_hash = elem.target:sub(2, #elem.target)3131-3232- return pandoc.RawInline('docbook', '<xref linkend="' .. escape_xml_arg(target_without_hash) .. '" />')3333- end3434-end
···11---[[22-Converts AST for reStructuredText roles into corresponding33-DocBook elements.44-55-Currently, only a subset of roles is supported.66-77-Reference:88- List of roles:99- https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html1010- manpage:1111- https://tdg.docbook.org/tdg/5.1/citerefentry.html1212- file:1313- https://tdg.docbook.org/tdg/5.1/filename.html1414-]]1515-1616-function Code(elem)1717- if elem.classes:includes('interpreted-text') then1818- local tag = nil1919- local content = elem.text2020- if elem.attributes['role'] == 'manpage' then2121- tag = 'citerefentry'2222- local title, volnum = content:match('^(.+)%((%w+)%)$')2323- if title == nil then2424- -- No volnum in parentheses.2525- title = content2626- end2727- content = '<refentrytitle>' .. title .. '</refentrytitle>' .. (volnum ~= nil and ('<manvolnum>' .. volnum .. '</manvolnum>') or '')2828- elseif elem.attributes['role'] == 'file' then2929- tag = 'filename'3030- elseif elem.attributes['role'] == 'command' then3131- tag = 'command'3232- elseif elem.attributes['role'] == 'option' then3333- tag = 'option'3434- elseif elem.attributes['role'] == 'var' then3535- tag = 'varname'3636- elseif elem.attributes['role'] == 'env' then3737- tag = 'envar'3838- end3939-4040- if tag ~= nil then4141- return pandoc.RawInline('docbook', '<' .. tag .. '>' .. content .. '</' .. tag .. '>')4242- end4343- end4444-end
-28
doc/build-aux/pandoc-filters/link-manpages.nix
···11-{ pkgs ? import ../../.. {} }:22-let33- inherit (pkgs) lib;44- manpageURLs = lib.importJSON (pkgs.path + "/doc/manpage-urls.json");55-in pkgs.writeText "link-manpages.lua" ''66- --[[77- Adds links to known man pages that aren't already in a link.88- ]]99-1010- local manpage_urls = {1111- ${lib.concatStringsSep "\n" (lib.mapAttrsToList (man: url:1212- " [${builtins.toJSON man}] = ${builtins.toJSON url},") manpageURLs)}1313- }1414-1515- traverse = 'topdown'1616-1717- -- Returning false as the second value aborts processing of child elements.1818- function Link(elem)1919- return elem, false2020- end2121-2222- function Code(elem)2323- local is_man_role = elem.classes:includes('interpreted-text') and elem.attributes['role'] == 'manpage'2424- if is_man_role and manpage_urls[elem.text] ~= nil then2525- return pandoc.Link(elem, manpage_urls[elem.text]), false2626- end2727- end2828-''
···11---[[22-Replaces Str AST nodes containing {role}, followed by a Code node33-by a Code node with attrs that would be produced by rST reader44-from the role syntax.55-66-This is to emulate MyST syntax in Pandoc.77-(MyST is a CommonMark flavour with rST features mixed in.)88-99-Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point1010-]]1111-1212-function Inlines(inlines)1313- for i = #inlines-1,1,-1 do1414- local first = inlines[i]1515- local second = inlines[i+1]1616- local correct_tags = first.tag == 'Str' and second.tag == 'Code'1717- if correct_tags then1818- -- docutils supports alphanumeric strings separated by [-._:]1919- -- We are slightly more liberal for simplicity.2020- -- Allow preceding punctuation (eg '('), otherwise '({file}`...`)'2121- -- does not match. Also allow anything followed by a non-breaking space2222- -- since pandoc emits those after certain abbreviations (e.g. e.g.).2323- local prefix, role = first.text:match('^(.*){([-._+:%w]+)}$')2424- if role ~= nil and (prefix == '' or prefix:match("^.*[%p ]$") ~= nil) then2525- if prefix == '' then2626- inlines:remove(i)2727- else2828- first.text = prefix2929- end3030- second.attributes['role'] = role3131- second.classes:insert('interpreted-text')3232- end3333- end3434- end3535- return inlines3636-end
···11---[[22-Replaces Code nodes with attrs that would be produced by rST reader33-from the role syntax by a Str AST node containing {role}, followed by a Code node.44-55-This is to emulate MyST syntax in Pandoc.66-(MyST is a CommonMark flavour with rST features mixed in.)77-88-Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point99-]]1010-1111-function Code(elem)1212- local role = elem.attributes['role']1313-1414- if elem.classes:includes('interpreted-text') and role ~= nil then1515- elem.classes = elem.classes:filter(function (c)1616- return c ~= 'interpreted-text'1717- end)1818- elem.attributes['role'] = nil1919-2020- return {2121- pandoc.Str('{' .. role .. '}'),2222- elem,2323- }2424- end2525-end
···11+# Images {#chap-images}22+33+This chapter describes tools for creating various types of images.44+55+```{=include=} sections66+images/appimagetools.section.md77+images/dockertools.section.md88+images/ocitools.section.md99+images/snaptools.section.md1010+images/portableservice.section.md1111+images/makediskimage.section.md1212+images/binarycache.section.md1313+```
-15
doc/builders/images.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"22- xmlns:xi="http://www.w3.org/2001/XInclude"33- xml:id="chap-images">44- <title>Images</title>55- <para>66- This chapter describes tools for creating various types of images.77- </para>88- <xi:include href="images/appimagetools.section.xml" />99- <xi:include href="images/dockertools.section.xml" />1010- <xi:include href="images/ocitools.section.xml" />1111- <xi:include href="images/snaptools.section.xml" />1212- <xi:include href="images/portableservice.section.xml" />1313- <xi:include href="images/makediskimage.section.xml" />1414- <xi:include href="images/binarycache.section.xml" />1515-</chapter>
+1-1
doc/builders/packages/dlib.section.md
···11# DLib {#dlib}2233-[DLib](http://dlib.net/) is a modern, C++-based toolkit which provides several machine learning algorithms.33+[DLib](http://dlib.net/) is a modern, C++\-based toolkit which provides several machine learning algorithms.4455## Compiling without AVX support {#compiling-without-avx-support}66
+27
doc/builders/packages/index.md
···11+# Packages {#chap-packages}22+33+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.44+55+```{=include=} sections66+citrix.section.md77+dlib.section.md88+eclipse.section.md99+elm.section.md1010+emacs.section.md1111+firefox.section.md1212+fish.section.md1313+fuse.section.md1414+ibus.section.md1515+kakoune.section.md1616+linux.section.md1717+locales.section.md1818+etc-files.section.md1919+nginx.section.md2020+opengl.section.md2121+shell-helpers.section.md2222+steam.section.md2323+cataclysm-dda.section.md2424+urxvt.section.md2525+weechat.section.md2626+xorg.section.md2727+```
-29
doc/builders/packages/index.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"22- xmlns:xi="http://www.w3.org/2001/XInclude"33- xml:id="chap-packages">44- <title>Packages</title>55- <para>66- 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.77- </para>88- <xi:include href="citrix.section.xml" />99- <xi:include href="dlib.section.xml" />1010- <xi:include href="eclipse.section.xml" />1111- <xi:include href="elm.section.xml" />1212- <xi:include href="emacs.section.xml" />1313- <xi:include href="firefox.section.xml" />1414- <xi:include href="fish.section.xml" />1515- <xi:include href="fuse.section.xml" />1616- <xi:include href="ibus.section.xml" />1717- <xi:include href="kakoune.section.xml" />1818- <xi:include href="linux.section.xml" />1919- <xi:include href="locales.section.xml" />2020- <xi:include href="etc-files.section.xml" />2121- <xi:include href="nginx.section.xml" />2222- <xi:include href="opengl.section.xml" />2323- <xi:include href="shell-helpers.section.xml" />2424- <xi:include href="steam.section.xml" />2525- <xi:include href="cataclysm-dda.section.xml" />2626- <xi:include href="urxvt.section.xml" />2727- <xi:include href="weechat.section.xml" />2828- <xi:include href="xorg.section.xml" />2929-</chapter>
+11
doc/builders/special.md
···11+# Special builders {#chap-special}22+33+This chapter describes several special builders.44+55+```{=include=} sections66+special/fhs-environments.section.md77+special/makesetuphook.section.md88+special/mkshell.section.md99+special/darwin-builder.section.md1010+special/vm-tools.section.md1111+```
-13
doc/builders/special.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"22- xmlns:xi="http://www.w3.org/2001/XInclude"33- xml:id="chap-special">44- <title>Special builders</title>55- <para>66- This chapter describes several special builders.77- </para>88- <xi:include href="special/fhs-environments.section.xml" />99- <xi:include href="special/makesetuphook.section.xml" />1010- <xi:include href="special/mkshell.section.xml" />1111- <xi:include href="special/darwin-builder.section.xml" />1212- <xi:include href="special/vm-tools.section.xml" />1313-</chapter>
+10
doc/contributing.md
···11+# Contributing to Nixpkgs {#part-contributing}22+33+```{=include=} chapters44+contributing/quick-start.chapter.md55+contributing/coding-conventions.chapter.md66+contributing/submitting-changes.chapter.md77+contributing/vulnerability-roundup.chapter.md88+contributing/reviewing-contributions.chapter.md99+contributing/contributing-to-documentation.chapter.md1010+```
+16
doc/contributing/staging-workflow.dot
···11+digraph {22+ "small changes" [shape=none]33+ "mass-rebuilds and other large changes" [shape=none]44+ "critical security fixes" [shape=none]55+ "broken staging-next fixes" [shape=none]66+77+ "small changes" -> master88+ "mass-rebuilds and other large changes" -> staging99+ "critical security fixes" -> master1010+ "broken staging-next fixes" -> "staging-next"1111+1212+ "staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]1313+ "staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]1414+1515+ master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"]1616+}
···214214- 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.215215- 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.216216217217-```{.graphviz caption="Staging workflow"}218218-digraph {219219- "small changes" [shape=none]220220- "mass-rebuilds and other large changes" [shape=none]221221- "critical security fixes" [shape=none]222222- "broken staging-next fixes" [shape=none]223223-224224- "small changes" -> master225225- "mass-rebuilds and other large changes" -> staging226226- "critical security fixes" -> master227227- "broken staging-next fixes" -> "staging-next"228228-229229- "staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]230230- "staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]231231-232232- master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"]233233-}234234-```217217+::: {.figure #fig-staging-workflow}218218+# Staging workflow219219+<!-- generated from ./staging-workflow.dot using: dot -Tsvg staging-workflow.dot > staging-workflow.svg -->220220+221221+:::235222236223[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.237224
+119-43
doc/default.nix
···11{ pkgs ? (import ./.. { }), nixpkgs ? { }}:22let33- doc-support = import ./doc-support { inherit pkgs nixpkgs; };33+ inherit (pkgs) lib;44+ inherit (lib) hasPrefix removePrefix;55+66+ lib-docs = import ./doc-support/lib-function-docs.nix {77+ inherit pkgs nixpkgs;88+ libsets = [99+ { name = "asserts"; description = "assertion functions"; }1010+ { name = "attrsets"; description = "attribute set functions"; }1111+ { name = "strings"; description = "string manipulation functions"; }1212+ { name = "versions"; description = "version string functions"; }1313+ { name = "trivial"; description = "miscellaneous functions"; }1414+ { name = "lists"; description = "list manipulation functions"; }1515+ { name = "debug"; description = "debugging functions"; }1616+ { name = "options"; description = "NixOS / nixpkgs option handling"; }1717+ { name = "path"; description = "path functions"; }1818+ { name = "filesystem"; description = "filesystem functions"; }1919+ { name = "sources"; description = "source filtering functions"; }2020+ { name = "cli"; description = "command-line serialization functions"; }2121+ ];2222+ };2323+2424+ epub = pkgs.runCommand "manual.epub" {2525+ nativeBuildInputs = with pkgs; [ libxslt zip ];2626+2727+ epub = ''2828+ <book xmlns="http://docbook.org/ns/docbook"2929+ xmlns:xlink="http://www.w3.org/1999/xlink"3030+ version="5.0"3131+ xml:id="nixpkgs-manual">3232+ <info>3333+ <title>Nixpkgs Manual</title>3434+ <subtitle>Version ${pkgs.lib.version}</subtitle>3535+ </info>3636+ <chapter>3737+ <title>Temporarily unavailable</title>3838+ <para>3939+ The Nixpkgs manual is currently not available in EPUB format,4040+ please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>4141+ instead.4242+ </para>4343+ <para>4444+ If you've used the EPUB manual in the past and it has been useful to you, please4545+ <link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.4646+ </para>4747+ </chapter>4848+ </book>4949+ '';5050+5151+ passAsFile = [ "epub" ];5252+ } ''5353+ mkdir scratch5454+ xsltproc \5555+ --param chapter.autolabel 0 \5656+ --nonet \5757+ --output scratch/ \5858+ ${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \5959+ $epubPath6060+6161+ echo "application/epub+zip" > mimetype6262+ zip -0Xq "$out" mimetype6363+ cd scratch && zip -Xr9D "$out" *6464+ '';6565+6666+ # NB: This file describes the Nixpkgs manual, which happens to use module6767+ # docs infra originally developed for NixOS.6868+ optionsDoc = pkgs.nixosOptionsDoc {6969+ inherit (pkgs.lib.evalModules {7070+ modules = [ ../pkgs/top-level/config.nix ];7171+ class = "nixpkgsConfig";7272+ }) options;7373+ documentType = "none";7474+ transformOptions = opt:7575+ opt // {7676+ declarations =7777+ map7878+ (decl:7979+ if hasPrefix (toString ../..) (toString decl)8080+ then8181+ let subpath = removePrefix "/" (removePrefix (toString ../.) (toString decl));8282+ in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; }8383+ else decl)8484+ opt.declarations;8585+ };8686+ };487in pkgs.stdenv.mkDerivation {588 name = "nixpkgs-manual";689790 nativeBuildInputs = with pkgs; [88- pandoc99- graphviz1010- libxml21111- libxslt1212- zip1313- jing1414- xmlformat9191+ nixos-render-docs1592 ];16931717- src = pkgs.nix-gitignore.gitignoreSource [] ./.;9494+ src = ./.;18951996 postPatch = ''2020- ln -s ${doc-support} ./doc-support/result9797+ ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json2198 '';22992323- epub = ''2424- <book xmlns="http://docbook.org/ns/docbook"2525- xmlns:xlink="http://www.w3.org/1999/xlink"2626- version="5.0"2727- xml:id="nixpkgs-manual">2828- <info>2929- <title>Nixpkgs Manual</title>3030- <subtitle>Version ${pkgs.lib.version}</subtitle>3131- </info>3232- <chapter>3333- <title>Temporarily unavailable</title>3434- <para>3535- The Nixpkgs manual is currently not available in EPUB format,3636- please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>3737- instead.3838- </para>3939- <para>4040- If you've used the EPUB manual in the past and it has been useful to you, please4141- <link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.4242- </para>4343- </chapter>4444- </book>4545- '';4646- passAsFile = [ "epub" ];100100+ buildPhase = ''101101+ cat \102102+ ./functions/library.md.in \103103+ ${lib-docs}/index.md \104104+ > ./functions/library.md105105+ substitute ./manual.md.in ./manual.md \106106+ --replace '@MANUAL_VERSION@' '${pkgs.lib.version}'471074848- preBuild = ''4949- cp $epubPath epub.xml5050- make -j$NIX_BUILD_CORES render-md108108+ mkdir -p out/media109109+110110+ mkdir -p out/highlightjs111111+ cp -t out/highlightjs \112112+ ${pkgs.documentation-highlighter}/highlight.pack.js \113113+ ${pkgs.documentation-highlighter}/LICENSE \114114+ ${pkgs.documentation-highlighter}/mono-blue.css \115115+ ${pkgs.documentation-highlighter}/loader.js116116+117117+ cp -t out ./overrides.css ./style.css118118+119119+ nixos-render-docs manual html \120120+ --manpage-urls ./manpage-urls.json \121121+ --revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \122122+ --stylesheet style.css \123123+ --stylesheet overrides.css \124124+ --stylesheet highlightjs/mono-blue.css \125125+ --script ./highlightjs/highlight.pack.js \126126+ --script ./highlightjs/loader.js \127127+ --toc-depth 1 \128128+ --section-toc-depth 1 \129129+ manual.md \130130+ out/index.html51131 '';5213253133 installPhase = ''54134 dest="$out/share/doc/nixpkgs"55135 mkdir -p "$(dirname "$dest")"5656- mv out/html "$dest"136136+ mv out "$dest"57137 mv "$dest/index.html" "$dest/manual.html"581385959- mv out/epub/manual.epub "$dest/nixpkgs-manual.epub"139139+ cp ${epub} "$dest/nixpkgs-manual.epub"6014061141 mkdir -p $out/nix-support/62142 echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products63143 echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products64144 '';6565-6666- # Environment variables6767- PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters";6868- PANDOC_LINK_MANPAGES_FILTER = import build-aux/pandoc-filters/link-manpages.nix { inherit pkgs; };69145}
···11-#22-# DocBook Configuration file for "xmlformat"33-# see http://www.kitebird.com/software/xmlformat/44-# 10 Sept. 200455-#66-77-# Only block elements88-ackno address appendix article biblioentry bibliography bibliomixed \99-biblioset blockquote book bridgehead callout calloutlist caption caution \1010-chapter chapterinfo classsynopsis cmdsynopsis colophon constraintdef \1111-constructorsynopsis dedication destructorsynopsis entry epigraph equation example \1212-figure formalpara funcsynopsis glossary glossdef glossdiv glossentry glosslist \1313-glosssee glossseealso graphic graphicco highlights imageobjectco important \1414-index indexdiv indexentry indexinfo info informalequation informalexample \1515-informalfigure informaltable legalnotice literallayout lot lotentry mediaobject \1616-mediaobjectco msgmain msgset note orderedlist para part preface primaryie \1717-procedure qandadiv qandaentry qandaset refentry refentrytitle reference \1818-refnamediv refsect1 refsect2 refsect3 refsection revhistory screenshot sect1 \1919-sect2 sect3 sect4 sect5 section seglistitem set setindex sidebar simpara \2020-simplesect step substeps synopfragment synopsis table term title \2121-toc variablelist varlistentry warning itemizedlist listitem \2222-footnote colspec partintro row simplelist subtitle tbody tgroup thead tip2323- format block2424- normalize no2525-2626-2727-#appendix bibliography chapter glossary preface reference2828-# element-break 32929-3030-sect1 section3131- element-break 23232-3333-3434-#3535-para abstract3636- format block3737- entry-break 13838- exit-break 13939- normalize yes4040-4141-title4242- format block4343- normalize = yes4444- entry-break = 04545- exit-break = 04646-4747-# Inline elements4848-abbrev accel acronym action application citation citebiblioid citerefentry citetitle \4949-classname co code command computeroutput constant country database date email emphasis \5050-envar errorcode errorname errortext errortype exceptionname fax filename \5151-firstname firstterm footnoteref foreignphrase funcdef funcparams function \5252-glossterm group guibutton guiicon guilabel guimenu guimenuitem guisubmenu \5353-hardware holder honorific indexterm inlineequation inlinegraphic inlinemediaobject \5454-interface interfacename \5555-keycap keycode keycombo keysym lineage link literal manvolnum markup medialabel \5656-menuchoice methodname methodparam modifier mousebutton olink ooclass ooexception \5757-oointerface option optional otheraddr othername package paramdef parameter personname \5858-phrase pob postcode productname prompt property quote refpurpose replaceable \5959-returnvalue revnumber sgmltag state street structfield structname subscript \6060-superscript surname symbol systemitem token trademark type ulink userinput \6161-uri varargs varname void wordasword xref year mathphrase member tag6262- format inline6363-6464-programlisting screen6565- format verbatim6666- entry-break = 06767- exit-break = 06868-6969-# This is needed so that the spacing inside those tags is kept.7070-term cmdsynopsis arg7171- normalize yes7272- format block
+11
doc/functions.md
···11+# Functions reference {#chap-functions}22+33+The nixpkgs repository has several utility functions to manipulate Nix expressions.44+55+```{=include=} sections66+functions/library.md77+functions/generators.section.md88+functions/debug.section.md99+functions/prefer-remote-fetch.section.md1010+functions/nix-gitignore.section.md1111+```
-14
doc/functions.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"22- xmlns:xlink="http://www.w3.org/1999/xlink"33- xmlns:xi="http://www.w3.org/2001/XInclude"44- xml:id="chap-functions">55- <title>Functions reference</title>66- <para>77- The nixpkgs repository has several utility functions to manipulate Nix expressions.88- </para>99- <xi:include href="functions/library.xml" />1010- <xi:include href="functions/generators.section.xml" />1111- <xi:include href="functions/debug.section.xml" />1212- <xi:include href="functions/prefer-remote-fetch.section.xml" />1313- <xi:include href="functions/nix-gitignore.section.xml" />1414-</chapter>
+5
doc/functions/library.md.in
···11+# Nixpkgs Library Functions {#sec-functions-library}22+33+Nixpkgs provides a standard library at `pkgs.lib`, or through `import <nixpkgs/lib>`.44+55+<!-- nixdoc-generated documentation must be appended here during build! -->
-14
doc/functions/library.xml
···11-<section xmlns="http://docbook.org/ns/docbook"22- xmlns:xlink="http://www.w3.org/1999/xlink"33- xmlns:xi="http://www.w3.org/2001/XInclude"44- xml:id="sec-functions-library">55- <title>Nixpkgs Library Functions</title>66-77- <para>88- Nixpkgs provides a standard library at <varname>pkgs.lib</varname>, or through <code>import <nixpkgs/lib></code>.99- </para>1010-1111- <!-- The index must have a root element to declare namespaces, but we1212- don't want to include it, so we select all of its children. -->1313- <xi:include href="./library/generated/index.xml" xpointer="xpointer(/root/*)" />1414-</section>
+33
doc/hooks/index.md
···11+# Hooks reference {#chap-hooks}22+33+Nixpkgs has several hook packages that augment the stdenv phases.44+55+The stdenv built-in hooks are documented in [](#ssec-setup-hooks).66+77+```{=include=} sections88+autoconf.section.md99+automake.section.md1010+autopatchelf.section.md1111+breakpoint.section.md1212+cmake.section.md1313+gdk-pixbuf.section.md1414+ghc.section.md1515+gnome.section.md1616+installShellFiles.section.md1717+libiconv.section.md1818+libxml2.section.md1919+meson.section.md2020+ninja.section.md2121+patch-rc-path-hooks.section.md2222+perl.section.md2323+pkg-config.section.md2424+postgresql-test-hook.section.md2525+python.section.md2626+qt-4.section.md2727+scons.section.md2828+tetex-tex-live.section.md2929+unzip.section.md3030+validatePkgConfig.section.md3131+waf.section.md3232+xcbuild.section.md3333+```
···11+# Languages and frameworks {#chap-language-support}22+33+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.44+55+```{=include=} sections66+agda.section.md77+android.section.md88+beam.section.md99+bower.section.md1010+chicken.section.md1111+coq.section.md1212+crystal.section.md1313+cuda.section.md1414+cuelang.section.md1515+dart.section.md1616+dhall.section.md1717+dotnet.section.md1818+emscripten.section.md1919+gnome.section.md2020+go.section.md2121+haskell.section.md2222+hy.section.md2323+idris.section.md2424+ios.section.md2525+java.section.md2626+javascript.section.md2727+lisp.section.md2828+lua.section.md2929+maven.section.md3030+nim.section.md3131+ocaml.section.md3232+octave.section.md3333+perl.section.md3434+php.section.md3535+pkg-config.section.md3636+python.section.md3737+qt.section.md3838+r.section.md3939+ruby.section.md4040+rust.section.md4141+swift.section.md4242+texlive.section.md4343+titanium.section.md4444+vim.section.md4545+```
-47
doc/languages-frameworks/index.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"22- xmlns:xi="http://www.w3.org/2001/XInclude"33- xml:id="chap-language-support">44- <title>Languages and frameworks</title>55- <para>66- 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.77- </para>88- <xi:include href="agda.section.xml" />99- <xi:include href="android.section.xml" />1010- <xi:include href="beam.section.xml" />1111- <xi:include href="bower.section.xml" />1212- <xi:include href="chicken.section.xml" />1313- <xi:include href="coq.section.xml" />1414- <xi:include href="crystal.section.xml" />1515- <xi:include href="cuda.section.xml" />1616- <xi:include href="cuelang.section.xml" />1717- <xi:include href="dart.section.xml" />1818- <xi:include href="dhall.section.xml" />1919- <xi:include href="dotnet.section.xml" />2020- <xi:include href="emscripten.section.xml" />2121- <xi:include href="gnome.section.xml" />2222- <xi:include href="go.section.xml" />2323- <xi:include href="haskell.section.xml" />2424- <xi:include href="hy.section.xml" />2525- <xi:include href="idris.section.xml" />2626- <xi:include href="ios.section.xml" />2727- <xi:include href="java.section.xml" />2828- <xi:include href="javascript.section.xml" />2929- <xi:include href="lisp.section.xml" />3030- <xi:include href="lua.section.xml" />3131- <xi:include href="maven.section.xml" />3232- <xi:include href="nim.section.xml" />3333- <xi:include href="ocaml.section.xml" />3434- <xi:include href="octave.section.xml" />3535- <xi:include href="perl.section.xml" />3636- <xi:include href="php.section.xml" />3737- <xi:include href="pkg-config.section.xml" />3838- <xi:include href="python.section.xml" />3939- <xi:include href="qt.section.xml" />4040- <xi:include href="r.section.xml" />4141- <xi:include href="ruby.section.xml" />4242- <xi:include href="rust.section.xml" />4343- <xi:include href="swift.section.xml" />4444- <xi:include href="texlive.section.xml" />4545- <xi:include href="titanium.section.xml" />4646- <xi:include href="vim.section.xml" />4747-</chapter>
···11+# Standard environment {#part-stdenv}22+33+```{=include=} chapters44+stdenv/stdenv.chapter.md55+stdenv/meta.chapter.md66+stdenv/multiple-output.chapter.md77+stdenv/cross-compilation.chapter.md88+stdenv/platform-notes.chapter.md99+```
+3-8
doc/stdenv/stdenv.chapter.md
···464464465465If the returned array contains exactly one object (e.g. `[{}]`), all values are optional and will be determined automatically.466466467467-```{=docbook}468468-<example>469469-<title>Standard output of an update script using commit feature</title>470470-```467467+::: {.example #var-passthru-updateScript-example-commit}468468+# Standard output of an update script using commit feature471469472470```json473471[···479481 }480482]481483```482482-483483-```{=docbook}484484-</example>485485-```484484+:::486485487486### Recursive attributes in `mkDerivation` {#mkderivation-recursive-attributes}488487
+7
doc/using-nixpkgs.md
···11+# Using Nixpkgs {#part-using}22+33+```{=include=} chapters44+using/configuration.chapter.md55+using/overlays.chapter.md66+using/overrides.chapter.md77+```
+4-2
doc/using/configuration.chapter.md
···185185186186The following attributes can be passed in [`config`](#chap-packageconfig).187187188188-```{=docbook}189189-<include xmlns="http://www.w3.org/2001/XInclude" href="../doc-support/result/config-options.docbook.xml"/>188188+```{=include=} options189189+id-prefix: opt-190190+list-id: configuration-variable-list191191+source: ../config-options.json190192```191193192194
···11+{ lib22+, mkDerivation33+, fetchFromGitHub44+, cmake55+66+, withLibei ? true77+88+, avahi99+, curl1010+, libICE1111+, libSM1212+, libX111313+, libXdmcp1414+, libXext1515+, libXinerama1616+, libXrandr1717+, libXtst1818+, libei1919+, libportal2020+, openssl2121+, pkg-config2222+, qtbase2323+, qttools2424+, wrapGAppsHook2525+}:2626+2727+mkDerivation rec {2828+ pname = "input-leap";2929+ version = "unstable-2023-05-24";3030+3131+ src = fetchFromGitHub {3232+ owner = "input-leap";3333+ repo = "input-leap";3434+ rev = "5e2f37bf9ec17627ae33558d99f90b7608ace422";3535+ hash = "sha256-55RqdRu/Hi2OTiLjAFJ6Gdgg9iO5NIIJCsOkUQjR9hk=";3636+ fetchSubmodules = true;3737+ };3838+3939+ nativeBuildInputs = [ pkg-config cmake wrapGAppsHook qttools ];4040+ buildInputs = [4141+ curl qtbase avahi4242+ libX11 libXext libXtst libXinerama libXrandr libXdmcp libICE libSM4343+ ] ++ lib.optionals withLibei [ libei libportal ];4444+4545+ cmakeFlags = [4646+ "-DINPUTLEAP_REVISION=${builtins.substring 0 8 src.rev}"4747+ ] ++ lib.optional withLibei "-DINPUTLEAP_BUILD_LIBEI=ON";4848+4949+ dontWrapGApps = true;5050+ preFixup = ''5151+ qtWrapperArgs+=(5252+ "''${gappsWrapperArgs[@]}"5353+ --prefix PATH : "${lib.makeBinPath [ openssl ]}"5454+ )5555+ '';5656+5757+ postFixup = ''5858+ substituteInPlace $out/share/applications/input-leap.desktop \5959+ --replace "Exec=input-leap" "Exec=$out/bin/input-leap"6060+ '';6161+6262+ meta = {6363+ description = "Open-source KVM software";6464+ longDescription = ''6565+ Input Leap is software that mimics the functionality of a KVM switch, which historically6666+ would allow you to use a single keyboard and mouse to control multiple computers by6767+ physically turning a dial on the box to switch the machine you're controlling at any6868+ given moment. Input Leap does this in software, allowing you to tell it which machine6969+ to control by moving your mouse to the edge of the screen, or by using a keypress7070+ to switch focus to a different system.7171+ '';7272+ homepage = "https://github.com/input-leap/input-leap";7373+ license = lib.licenses.gpl2Plus;7474+ maintainers = with lib.maintainers; [ kovirobi phryneas twey shymega ];7575+ platforms = lib.platforms.linux;7676+ };7777+}