From da03c2ab87c5b0c1cf5793d785485496e86f25b2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 23 Apr 2019 11:06:32 +0800 Subject: [PATCH] simplify documentation build for NixOS 19.03 --- artiq/default.nix | 4 ++-- artiq/pkgs/artiq-manual.nix | 8 +++----- artiq/pkgs/python-deps.nix | 24 ------------------------ 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/artiq/default.nix b/artiq/default.nix index 43b58b7..51a4989 100644 --- a/artiq/default.nix +++ b/artiq/default.nix @@ -24,10 +24,10 @@ let }) {} boards; manualPackages = import ./pkgs/artiq-manual.nix { inherit stdenv lib fetchgit python3Packages texlive texinfo; - inherit (pythonDeps) sphinx-argparse sphinxcontrib-wavedrom; + inherit (pythonDeps) sphinxcontrib-wavedrom; }; mainPackages = rec { - inherit (pythonDeps) asyncserial levenshtein pythonparser quamash pyqtgraph-qt5 misoc migen microscope jesd204b lit outputcheck sphinx-argparse wavedrom sphinxcontrib-wavedrom; + inherit (pythonDeps) asyncserial levenshtein pythonparser quamash pyqtgraph-qt5 misoc migen microscope jesd204b lit outputcheck wavedrom sphinxcontrib-wavedrom; binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {}; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {}; rustc = callPackage ./pkgs/rust diff --git a/artiq/pkgs/artiq-manual.nix b/artiq/pkgs/artiq-manual.nix index 0fa590d..14780e9 100644 --- a/artiq/pkgs/artiq-manual.nix +++ b/artiq/pkgs/artiq-manual.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, python3Packages, texlive, texinfo, sphinx-argparse, sphinxcontrib-wavedrom }: +{ stdenv, lib, fetchgit, python3Packages, texlive, texinfo, sphinxcontrib-wavedrom }: let artiqVersion = import ./artiq-version.nix; @@ -19,7 +19,7 @@ let src = import ./artiq-src.nix { inherit fetchgit; }; buildInputs = [ python3Packages.sphinx python3Packages.sphinx_rtd_theme - sphinx-argparse sphinxcontrib-wavedrom + python3Packages.sphinx-argparse sphinxcontrib-wavedrom ] ++ lib.optional (isLatexPdfTarget target) latex ++ lib.optional (target == "texinfo") texinfo; @@ -51,8 +51,6 @@ let ''; }; - # TODO: starting with NixOS 19.XX, drop sphinxcontrib-wavedrom-1_3_1 - # and simplify `targets`: - targets = [ "html" ] ++ (lib.optional (builtins.compareVersions sphinxcontrib-wavedrom.version "2.0.0" != -1) "latexpdf"); + targets = [ "html" "latexpdf" ]; in builtins.listToAttrs (map (target: { name = "artiq-manual-${target}"; value = artiq-manual target; }) targets) diff --git a/artiq/pkgs/python-deps.nix b/artiq/pkgs/python-deps.nix index bf0be30..772cbdf 100644 --- a/artiq/pkgs/python-deps.nix +++ b/artiq/pkgs/python-deps.nix @@ -189,30 +189,6 @@ rec { # Documentation building dependencies - # TODO: sphinx-argparse will be available from nixos-19.XX - sphinx-argparse = python3Packages.buildPythonPackage rec { - pname = "sphinx-argparse"; - version = "0.2.5"; - - src = python3Packages.fetchPypi { - inherit pname version; - sha256 = "05wc8f5hb3jsg2vh2jf7jsyan8d4i09ifrz2c8fp6f7x1zw9iav0"; - }; - - checkInputs = [ python3Packages.pytest ]; - - checkPhase = "py.test"; - - propagatedBuildInputs = [ python3Packages.sphinx ]; - - meta = with stdenv.lib; { - description = "A sphinx extension that automatically documents argparse commands and options"; - homepage = https://github.com/ribozz/sphinx-argparse; - license = licenses.mit; - #maintainers = with maintainers; [ clacke ]; - }; - }; - wavedrom = python3Packages.buildPythonPackage rec { pname = "wavedrom"; version = "0.1";