1
0
Fork 0

simplify documentation build for NixOS 19.03

This commit is contained in:
Sebastien Bourdeauducq 2019-04-23 11:06:32 +08:00
parent 772788a183
commit da03c2ab87
3 changed files with 5 additions and 31 deletions

View File

@ -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

View File

@ -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)

View File

@ -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";