redshift: libappindicator is linux only
[NixPkgs.git] / doc / doc-support / default.nix
blob53990b6771962097c646d3f0b45ef32870ba0d30
1 { pkgs ? (import ../.. {}), nixpkgs ? { }}:
2 let
3   locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
4   functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; };
5   version = pkgs.lib.version;
7   epub-xsl = pkgs.writeText "epub.xsl" ''
8     <?xml version='1.0'?>
9     <xsl:stylesheet
10       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11       version="1.0">
12       <xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl" />
13       <xsl:import href="${./parameters.xml}"/>
14     </xsl:stylesheet>
15   '';
17   xhtml-xsl = pkgs.writeText "xhtml.xsl" ''
18     <?xml version='1.0'?>
19     <xsl:stylesheet
20       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
21       version="1.0">
22       <xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/xhtml/docbook.xsl" />
23       <xsl:import href="${./parameters.xml}"/>
24     </xsl:stylesheet>
25   '';
26 in pkgs.runCommand "doc-support" {}
28   mkdir result
29   (
30     cd result
31     ln -s ${locationsXml} ./function-locations.xml
32     ln -s ${functionDocs} ./function-docs
34     ln -s ${pkgs.docbook5}/xml/rng/docbook/docbook.rng ./docbook.rng
35     ln -s ${pkgs.docbook_xsl_ns}/xml/xsl ./xsl
36     ln -s ${epub-xsl} ./epub.xsl
37     ln -s ${xhtml-xsl} ./xhtml.xsl
39     ln -s ${../../nixos/doc/xmlformat.conf} ./xmlformat.conf
40     ln -s ${pkgs.documentation-highlighter} ./highlightjs
42     echo -n "${version}" > ./version
43   )
44   mv result $out