diff --git a/ci.nix b/ci.nix index 867f224..291112e 100644 --- a/ci.nix +++ b/ci.nix @@ -35,49 +35,7 @@ let device = import (liminix + "/devices/qemu"); liminix-config = vanilla; }).buildEnv; - doc = - let - json = - (import liminix { - inherit borderVmConf; - device = import (liminix + "/devices/qemu"); - liminix-config = - { ... }: - { - imports = [ ./modules/all-modules.nix ]; - }; - }).outputs.optionsJson; - in - pkgs.stdenv.mkDerivation { - name = "liminix-doc"; - nativeBuildInputs = with pkgs; [ - gnumake - sphinx - fennel - luaPackages.lyaml - ]; - - src = pkgs.lib.sources.sourceFilesBySuffices - (pkgs.lib.cleanSource ./. ) [ - ".nix" ".rst" "Makefile" ".svg" ".fnl" ".py" - ]; - - buildPhase = '' - cat ${json} | fennel --correlate doc/parse-options.fnl > doc/modules-generated.inc.rst - cat ${json} | fennel --correlate doc/parse-options-outputs.fnl > doc/outputs-generated.inc.rst - cp ${(import ./doc/hardware.nix)} doc/hardware.rst - make -C doc html - ''; - installPhase = '' - mkdir -p $out/nix-support $out/share/doc/ - cd doc - cp *-generated.inc.rst hardware.rst $out - ln -s ${json} $out/options.json - cp -a _build/html $out/share/doc/liminix - echo "file source-dist \"$out/share/doc/liminix\"" \ - > $out/nix-support/hydra-build-products - ''; - }; + doc = pkgs.callPackage ./doc.nix { inherit liminix borderVmConf; } ; }; in jobs