The documentation I would like to add for the build configuration file uses a titled example, which doesn't render nicely with Just The Docs without this change. Signed-off-by: Alyssa Ross <hi@alyssa.is> --- Documentation/jekyll.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Documentation/jekyll.nix b/Documentation/jekyll.nix index 6f2866f..16c2c38 100644 --- a/Documentation/jekyll.nix +++ b/Documentation/jekyll.nix @@ -3,11 +3,39 @@ { config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage ( -{ bundlerApp }: +{ lib, bundlerApp, defaultGemConfig, fetchFromGitHub, fetchpatch }: bundlerApp { pname = "jekyll"; gemdir = ./.; exes = [ "jekyll" ]; + + gemConfig = defaultGemConfig // { + # We override Just the Docs to improve AsciiDoc support. + just-the-docs = attrs: + let super = defaultGemConfig.just-the-docs or (lib.const {}) attrs; in + super // { + # The gem tarball doesn't contain e.g. the SCSS files. + src = fetchFromGitHub { + owner = "just-the-docs"; + repo = "just-the-docs"; + rev ="v${attrs.version}"; + sha256 = assert attrs.version == "0.4.0.rc1"; "sUgwPio5Lukd8c0dR5kbRxW5vT/ctO69lbyg+AvcUbQ="; + }; + + patches = super.patches or attrs.patches or [] ++ [ + # https://github.com/just-the-docs/just-the-docs/pull/944 + (fetchpatch { + url = "https://github.com/alyssais/just-the-docs/commit/6bf1f26ab70b6a12fd090b99cda..."; + sha256 = "jv3I7Unu6ZMl0hjvBlvTWIVH8cYfO3cVS1BoJnYWo+U="; + }) + ]; + + postPatch = '' + substituteInPlace just-the-docs.gemspec \ + --replace 'git ls-files -z' 'find * -print0' + ''; + }; + }; } ) { } -- 2.37.1