summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/nix-dont-build-html-doc.diff
blob: d9244ac9ff69763b6fd714915dafd732c35dabe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"--enable-doc-gen" configure flag will enable HTML document generation that requires mdbook.
We can't simply disable it because we need manpages.

Author: Zhu Zihao <all_but_last@163.com>

--- a/doc/manual/local.mk
+++ b/doc/manual/local.mk
@@ -172,11 +172,6 @@ $(d)/src/SUMMARY-rl-next.md: $(d)/src/release-notes/rl-next.md
 	  true > $@; \
 	fi
 
-# Generate the HTML manual.
-.PHONY: manual-html
-manual-html: $(docdir)/manual/index.html
-install: $(docdir)/manual/index.html
-
 # Generate 'nix' manpages.
 .PHONY: manpages
 manpages: $(mandir)/man1/nix3-manpages
@@ -202,26 +197,3 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
 		rm $$tmpFile; \
 	done
 	@touch $@
-
-# the `! -name 'contributing.md'` filter excludes the one place where
-# `@docroot@` is to be preserved for documenting the mechanism
-# FIXME: maybe contributing guides should live right next to the code
-# instead of in the manual
-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/store/types $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md $(d)/src/language/builtin-constants.md $(d)/src/release-notes/rl-next.md
-	$(trace-gen) \
-		tmp="$$(mktemp -d)"; \
-		cp -r doc/manual "$$tmp"; \
-		find "$$tmp" -name '*.md' | while read -r file; do \
-			$(call process-includes,$$file,$$file); \
-		done; \
-		find "$$tmp" -name '*.md' ! -name 'documentation.md' | while read -r file; do \
-			docroot="$$(realpath --relative-to="$$(dirname "$$file")" $$tmp/manual/src)"; \
-			sed -i "s,@docroot@,$$docroot,g" "$$file"; \
-		done; \
-		set -euo pipefail; \
-		RUST_LOG=warn mdbook build "$$tmp/manual" -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \
-			| { grep -Fv "because fragment resolution isn't implemented" || :; }; \
-		rm -rf "$$tmp/manual"
-	@rm -rf $(DESTDIR)$(docdir)/manual
-	@mv $(DESTDIR)$(docdir)/manual.tmp/html $(DESTDIR)$(docdir)/manual
-	@rm -rf $(DESTDIR)$(docdir)/manual.tmp