diff options
author | Vincent Ambo <mail@tazj.in> | 2022-06-16T14·52+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-06-16T15·08+0000 |
commit | ac10907913b713403194021c1d68cb34a1d68a19 (patch) | |
tree | 51b83c80bee27666a74d704d0db660f1c53248d5 /tools/nixery/docs/default.nix | |
parent | 15a9aad6584e7922dbff029f9eebaa1928ea99c5 (diff) |
docs(nixery): dynamically display current nixpkgs commit r/4241
People occasionally ask what the current nixpkgs commit is on nixery.dev (see e.g. https://github.com/tazjin/nixery/issues/153). With this change, the commit is displayed on nixery.dev if Nixery is built for the TVL deployment. Change-Id: I795220214db5a367a126c9b4bd03754e9f144940 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5881 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tools/nixery/docs/default.nix')
-rw-r--r-- | tools/nixery/docs/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/nixery/docs/default.nix b/tools/nixery/docs/default.nix index 876a34dcf152..74409fcfa92f 100644 --- a/tools/nixery/docs/default.nix +++ b/tools/nixery/docs/default.nix @@ -7,7 +7,7 @@ # Some of the documentation is pulled in and included from other # sources. -{ fetchFromGitHub, mdbook, runCommand, rustPlatform }: +{ fetchFromGitHub, mdbook, runCommand, rustPlatform, postamble ? "" }: let nix-1p = fetchFromGitHub { @@ -17,10 +17,14 @@ let sha256 = "1pf9i90gn98vz67h296w5lnwhssk62dc6pij983dff42dbci7lhj"; }; in -runCommand "nixery-book" { } '' +runCommand "nixery-book" +{ + POSTAMBLE = postamble; +} '' mkdir -p $out cp -r ${./.}/* . chmod -R a+w src cp ${nix-1p}/README.md src/nix-1p.md + echo "''${POSTAMBLE}" >> src/nixery.md ${mdbook}/bin/mdbook build -d $out '' |