Skip to content

Commit

Permalink
Build unstable manuals
Browse files Browse the repository at this point in the history
  • Loading branch information
oxij committed Mar 27, 2019
1 parent 150928e commit db68a11
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
28 changes: 21 additions & 7 deletions Makefile
Expand Up @@ -31,11 +31,18 @@ NIXOS_MANUAL_OUT = nixos/manual
all: $(NIXOS_MANUAL_OUT)

$(NIXOS_MANUAL_OUT): $(NIXOS_MANUAL_IN) bootstrapify-docbook.sh bootstrapify-docbook.xsl layout.tt common.tt
./bootstrapify-docbook.sh $(NIXOS_MANUAL_IN)/share/doc/nixos $(NIXOS_MANUAL_OUT) 'NixOS manual' nixos https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual
@echo rm -rf $@
./bootstrapify-docbook.sh $(NIXOS_MANUAL_IN)/stable/share/doc/nixos $(NIXOS_MANUAL_OUT)/stable 'NixOS manual' nixos https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual
# put unstable manual under $(NIXOS_MANUAL_OUT)/unstable
./bootstrapify-docbook.sh $(NIXOS_MANUAL_IN)/unstable/share/doc/nixos $(NIXOS_MANUAL_OUT)/unstable 'NixOS manual' nixos https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual
# alias for stable
ln -sfn stable/index.html $(NIXOS_MANUAL_OUT)/index.html

$(NIXOS_MANUAL_IN):
@echo rm -f $@
nix-build -o $@ '<nixpkgs/nixos>' -I nixpkgs=$(NIXPKGS) \
@echo rm -f $@ ; mkdir -p $@
nix-build -o $@/stable '<nixpkgs/nixos>' -I nixpkgs=$(NIXPKGS) \
-A config.system.build.manual.manual --arg configuration '{ fileSystems."/".device = "/dummy"; }'
nix-build -o $@/unstable '<nixpkgs/nixos>' -I nixpkgs=$(NIXPKGS_UNSTABLE) \
-A config.system.build.manual.manual --arg configuration '{ fileSystems."/".device = "/dummy"; }'

### Prettify the Nix Pills
Expand Down Expand Up @@ -94,12 +101,19 @@ NIXPKGS_MANUAL_OUT = nixpkgs/manual
all: $(NIXPKGS_MANUAL_OUT)

$(NIXPKGS_MANUAL_OUT): $(NIXPKGS_MANUAL_IN) bootstrapify-docbook.sh bootstrapify-docbook.xsl layout.tt common.tt
./bootstrapify-docbook.sh $(NIXPKGS_MANUAL_IN)/share/doc/nixpkgs $(NIXPKGS_MANUAL_OUT) 'Nixpkgs manual' nixpkgs https://github.com/NixOS/nixpkgs/tree/master/doc
ln -sfn manual.html $(NIXPKGS_MANUAL_OUT)/index.html
@echo rm -rf $@
./bootstrapify-docbook.sh $(NIXPKGS_MANUAL_IN)/stable/share/doc/nixpkgs $(NIXPKGS_MANUAL_OUT)/stable 'Nixpkgs manual' nixpkgs https://github.com/NixOS/nixpkgs/tree/master/doc
ln -sfn manual.html $(NIXPKGS_MANUAL_OUT)/stable/index.html
# put unstable manual under $(NIXOS_MANUAL_OUT)/unstable
./bootstrapify-docbook.sh $(NIXPKGS_MANUAL_IN)/unstable/share/doc/nixpkgs $(NIXPKGS_MANUAL_OUT)/unstable 'Nixpkgs manual' nixpkgs https://github.com/NixOS/nixpkgs/tree/master/doc
ln -sfn manual.html $(NIXPKGS_MANUAL_OUT)/unstable/index.html
# alias for stable
ln -sfn stable/index.html $(NIXPKGS_MANUAL_OUT)/index.html

$(NIXPKGS_MANUAL_IN):
@echo rm -f $@
nix-build -o $@ '<nixpkgs/doc>' -I nixpkgs=$(NIXPKGS)
@echo rm -f $@ ; mkdir -p $@
nix-build -o $@/stable '<nixpkgs/doc>' -I nixpkgs=$(NIXPKGS)
nix-build -o $@/unstable '<nixpkgs/doc>' -I nixpkgs=$(NIXPKGS_UNSTABLE)


all: nixpkgs/packages.json.gz \
Expand Down
3 changes: 2 additions & 1 deletion layout.tt
Expand Up @@ -100,7 +100,8 @@
[% ELSIF menu == 'nixpkgs' %]
<ul class="nav pull-left">
<li><a href="[%root%]nixpkgs/download.html">Download</a></li>
<li><a href="[%root%]nixpkgs/manual">Manual</a></li>
<li><a href="[%root%]nixpkgs/manual">Manual ([%latestNixOSSeries%])</a></li>
<li><a href="[%root%]nixpkgs/manual/unstable">Manual (unstable)</a></li>
</ul>
<ul class="nav pull-right">
<li><a href="https://github.com/NixOS/nixpkgs"><i class="fa fa-github"></i></a></li>
Expand Down
2 changes: 2 additions & 0 deletions nixos/support.tt
Expand Up @@ -11,6 +11,8 @@
the list of configuration options by running <tt>man
configuration.nix</tt>. You can also <a href="options.html">search
the list of options online</a>.</p>

<p>There is also <a href="[%nixosManual%]/unstable/">a version for the <strong>nixos-unstable</strong> channel</a>.</p>
</div>

<div class="span4" id="discourse">
Expand Down

0 comments on commit db68a11

Please sign in to comment.