forked from M-Labs/nix-scripts
build sipyco manual
This commit is contained in:
parent
c16af00977
commit
57b817f07e
@ -8,8 +8,8 @@ rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "sipyco";
|
||||
rev = "9468933f8ca5711493831439651b2f66b0125189";
|
||||
sha256 = "191782l0yhgsli50rkc7w4bhb87lf20gr89f4w5ibdxq1k38l8ii";
|
||||
rev = "09f7a7879f889d0d5d44c277513caca4d03dea0d";
|
||||
sha256 = "1wwmw3i935cip6s44a6dps7vbycnxwhwqplqi18iv50rc9ixdf5h";
|
||||
};
|
||||
propagatedBuildInputs = with python3Packages; [ numpy ];
|
||||
};
|
||||
|
@ -206,11 +206,15 @@ let
|
||||
EOF
|
||||
'';
|
||||
pythonDeps = import ./artiq-full/python-deps.nix { inherit pkgs; };
|
||||
manualPackages = import ./artiq-full/manual.nix {
|
||||
sipycoManualPackages = import ./artiq-full/sipyco-manual.nix {
|
||||
inherit (pkgs) stdenv lib python3Packages texlive texinfo;
|
||||
inherit (import <artiq-fast> { inherit pkgs; }) sipyco;
|
||||
};
|
||||
artiqManualPackages = import ./artiq-full/artiq-manual.nix {
|
||||
inherit (pkgs) stdenv lib fetchgit git python3Packages texlive texinfo;
|
||||
inherit (pythonDeps) sphinxcontrib-wavedrom;
|
||||
};
|
||||
jobs = (import generatedNix { inherit pkgs; }) // manualPackages // {
|
||||
jobs = (import generatedNix { inherit pkgs; }) // sipycoManualPackages // artiqManualPackages // {
|
||||
# This is in the example in the ARTIQ manual - precompile it to speed up
|
||||
# installation for users.
|
||||
matplotlib-qt = pkgs.lib.hydraJob (pkgs.python3Packages.matplotlib.override { enableQt = true; });
|
||||
|
56
artiq-full/sipyco-manual.nix
Normal file
56
artiq-full/sipyco-manual.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{ stdenv, lib, python3Packages, texlive, texinfo, sipyco }:
|
||||
|
||||
let
|
||||
version = sipyco.version;
|
||||
|
||||
isLatexPdfTarget = target: builtins.match "latexpdf.*" target != null;
|
||||
|
||||
latex = texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-basic latexmk cmap collection-fontsrecommended fncychap
|
||||
titlesec tabulary varwidth framed fancyvrb float wrapfig parskip
|
||||
upquote capt-of needspace etoolbox;
|
||||
};
|
||||
|
||||
sipyco-manual = target: stdenv.mkDerivation rec {
|
||||
name = "sipyco-manual-${target}-${version}";
|
||||
inherit version;
|
||||
|
||||
src = sipyco.src;
|
||||
buildInputs = [
|
||||
python3Packages.sphinx python3Packages.sphinx_rtd_theme
|
||||
python3Packages.sphinx-argparse sipyco
|
||||
] ++
|
||||
lib.optional (isLatexPdfTarget target) latex ++
|
||||
lib.optional (target == "texinfo") texinfo;
|
||||
|
||||
preBuild = ''
|
||||
export SOURCE_DATE_EPOCH=200000
|
||||
cd doc
|
||||
'';
|
||||
makeFlags = [ target ];
|
||||
|
||||
installPhase =
|
||||
let
|
||||
dest = "$out/share/doc/sipyco-manual";
|
||||
in
|
||||
if isLatexPdfTarget target
|
||||
then ''
|
||||
mkdir -p ${dest}
|
||||
cp _build/latex/SiPyCo.pdf ${dest}/
|
||||
|
||||
mkdir -p $out/nix-support/
|
||||
echo doc-pdf manual ${dest} SiPyCo.pdf >> $out/nix-support/hydra-build-products
|
||||
''
|
||||
else ''
|
||||
mkdir -p ${dest}
|
||||
cp -r _build/${target} ${dest}/
|
||||
|
||||
mkdir -p $out/nix-support/
|
||||
echo doc manual ${dest}/${target} index.html >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
|
||||
targets = [ "html" "latexpdf" ];
|
||||
in
|
||||
builtins.listToAttrs (map (target: { name = "sipyco-manual-${target}"; value = sipyco-manual target; }) targets)
|
@ -250,6 +250,14 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
||||
job = web:web:web
|
||||
command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/web
|
||||
</runcommand>
|
||||
<runcommand>
|
||||
job = artiq:full:sipyco-manual-html
|
||||
command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/sipyco-manual-html
|
||||
</runcommand>
|
||||
<runcommand>
|
||||
job = artiq:full:sipyco-manual-latexpdf
|
||||
command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/sipyco-manual-latexpdf
|
||||
</runcommand>
|
||||
<runcommand>
|
||||
job = artiq:full:artiq-manual-html
|
||||
command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/artiq-manual-html-beta
|
||||
@ -395,7 +403,13 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
||||
return 301 /experiment-control/resources/;
|
||||
'';
|
||||
|
||||
# autogenerated ARTIQ manuals
|
||||
# autogenerated manuals
|
||||
locations."/artiq/sipyco-manual/" = {
|
||||
alias = "${hydraWwwOutputs}/sipyco-manual-html-beta/share/doc/sipyco-manual/html/";
|
||||
};
|
||||
locations."=/artiq/sipyco-manual.pdf" = {
|
||||
alias = "${hydraWwwOutputs}/sipyco-manual-latexpdf-beta/share/doc/sipyco-manual/SiPyCo.pdf";
|
||||
};
|
||||
locations."/artiq/manual-beta/" = {
|
||||
alias = "${hydraWwwOutputs}/artiq-manual-html-beta/share/doc/artiq-manual/html/";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user