summary refs log tree commit diff
path: root/release/checks/doc-links.nix
diff options
context:
space:
mode:
Diffstat (limited to 'release/checks/doc-links.nix')
-rw-r--r--release/checks/doc-links.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/release/checks/doc-links.nix b/release/checks/doc-links.nix
new file mode 100644
index 0000000..171eaf5
--- /dev/null
+++ b/release/checks/doc-links.nix
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2022 Unikie
+
+import ../../lib/eval-config.nix ({ config, ... }:
+config.pkgs.callPackage ({ runCommand, ruby, wget }:
+
+runCommand "spectrum-doc-links" {
+  doc = import ../../Documentation { inherit config; };
+  nativeBuildInputs = [ ruby wget ];
+} ''
+  mkdir root
+  ln -s $doc root/doc
+  ruby -run -e httpd -- --port 4000 root &
+  wget -r -nv --delete-after --no-parent --retry-connrefused http://localhost:4000/doc/
+  touch $out
+''
+) { })