diff --git a/default.nix b/default.nix index 63b37a48d..e6253ffca 100644 --- a/default.nix +++ b/default.nix @@ -16,21 +16,24 @@ let overlays = [ ]; inherit system; }; - + nix-dev-python-pkgs = with pkgs.python310.pkgs; [ + linkify-it-py + myst-parser + sphinx + sphinx-book-theme + sphinx-copybutton + sphinx-design + sphinx-notfound-page + sphinx-sitemap + pkgs.perl + ]; nix-dev = pkgs.stdenv.mkDerivation { name = "nix-dev"; src = ./.; - nativeBuildInputs = with pkgs.python310.pkgs; [ - linkify-it-py - myst-parser - sphinx - sphinx-book-theme - sphinx-copybutton - sphinx-design - sphinx-notfound-page - sphinx-sitemap - pkgs.perl + nativeBuildInputs = [ + nix-dev-python-pkgs + pkgs.texlive.combined.scheme-full ]; buildPhase = let @@ -42,6 +45,7 @@ let '' ${lib.optionalString withManuals "cp -f ${substitutedNixManualReference} source/reference/nix-manual.md"} make html + make latexpdf ''; installPhase = let @@ -68,6 +72,7 @@ let '' mkdir -p $out/manual/nix cp -R build/html/* $out/ + cp build/latex/nix-dev.pdf $out/ '' + lib.optionalString withManuals '' ${lib.concatStringsSep "\n" (lib.mapAttrsToList release releases.nixReleases)} ${lib.concatStringsSep "\n" (lib.mapAttrsToList mutableRedirect releases.mutableNixManualRedirects)} diff --git a/npins/sources.json b/npins/sources.json index 15cda801f..f3c3e0315 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -8,9 +8,9 @@ "repo": "nixpkgs" }, "branch": "nixpkgs-unstable", - "revision": "3a05eebede89661660945da1f151959900903b6a", - "url": "https://github.com/nixos/nixpkgs/archive/3a05eebede89661660945da1f151959900903b6a.tar.gz", - "hash": "0n56l6v5k3lmrr4vjnp6xk1s46shkwdkvai05dzcbcabpl29yb9g" + "revision": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", + "url": "https://github.com/nixos/nixpkgs/archive/ed30f8aba41605e3ab46421e3dcb4510ec560ff8.tar.gz", + "hash": "0mg2wzzzakbb33z1a1qrlslr8q84j1ci9j53p9dj8nggmm2xv0p6" }, "poetry2nix": { "type": "Git", @@ -27,4 +27,3 @@ }, "version": 3 } - diff --git a/source/_static/_img/nix.pdf b/source/_static/_img/nix.pdf new file mode 100644 index 000000000..4c344d851 Binary files /dev/null and b/source/_static/_img/nix.pdf differ diff --git a/source/_templates/download-links.html b/source/_templates/download-links.html new file mode 100644 index 000000000..dcfb7de4a --- /dev/null +++ b/source/_templates/download-links.html @@ -0,0 +1 @@ +

nix.dev as PDF

diff --git a/source/conf.py b/source/conf.py index bdeb11f42..16dd719f0 100644 --- a/source/conf.py +++ b/source/conf.py @@ -201,6 +201,7 @@ "about.html", "search-field.html", "sbt-sidebar-nav.html", + "download-links.html", ], } @@ -260,9 +261,11 @@ # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. - 'preamble': '\setcounter{tocdepth}{3}', + 'preamble': r'\setcounter{tocdepth}{2}', + 'sphinxsetup': r'TitleColor={RGB}{87, 154, 202}', # Latex figure (float) alignment #'figure_align': 'htbp', + } # Grouping the document tree into LaTeX files. List of tuples @@ -271,17 +274,18 @@ latex_documents = [ ( master_doc, - "nixpkgs-cookbook.tex", - "nixpkgs-cookbook Documentation", + "nix-dev.tex", + "nix.dev", "nix.dev contributors", "manual", + True, # toctree only ), ] latex_engine = "xelatex" # The name of an image file (relative to this directory) to place at the top of # the title page. -# latex_logo = None +latex_logo = "_static/_img/nix.pdf" # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. @@ -290,10 +294,10 @@ latex_use_xindy = False # If true, show page references after internal links. -# latex_show_pagerefs = False +latex_show_pagerefs = True # If true, show URL addresses after external links. -# latex_show_urls = False +latex_show_urls = 'footnote' # Documents to append as an appendix to all manuals. # latex_appendices = []