patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: "José Pekkarinen" <jose.pekkarinen@unikie.com>,
	"Ivan Nikolaenko" <ivan.nikolaenko@unikie.com>
Subject: [PATCH 3/4] Documentation/jekyll: patch for AsciiDoc examples
Date: Wed, 31 Aug 2022 09:37:26 +0000	[thread overview]
Message-ID: <20220831093727.282797-3-hi@alyssa.is> (raw)
In-Reply-To: <20220831093727.282797-1-hi@alyssa.is>

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/6bf1f26ab70b6a12fd090b99cda85f557da837eb.patch";
+            sha256 = "jv3I7Unu6ZMl0hjvBlvTWIVH8cYfO3cVS1BoJnYWo+U=";
+          })
+        ];
+
+        postPatch = ''
+          substituteInPlace just-the-docs.gemspec \
+              --replace 'git ls-files -z' 'find * -print0'
+        '';
+      };
+  };
 }
 ) { }
-- 
2.37.1



  parent reply	other threads:[~2022-08-31  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  9:37 [PATCH 1/4] Introduce a build configuration file Alyssa Ross
2022-08-31  9:37 ` [PATCH 2/4] nix: prefer build configs from <spectrum-config> Alyssa Ross
2022-09-08 11:40   ` José Pekkarinen
2022-09-14  6:58   ` Alyssa Ross
2022-08-31  9:37 ` Alyssa Ross [this message]
2022-09-14  7:03   ` [PATCH 3/4] Documentation/jekyll: patch for AsciiDoc examples Alyssa Ross
2022-08-31  9:37 ` [PATCH 4/4] Documentation: document build configuration file Alyssa Ross
2022-09-14  6:58   ` Alyssa Ross
2022-09-06  5:53 ` [PATCH 1/4] Introduce a " Ville Ilvonen
     [not found]   ` <87fsh5c60x.fsf@alyssa.is>
2022-09-08 11:39     ` José Pekkarinen
2022-09-14  6:58 ` Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831093727.282797-3-hi@alyssa.is \
    --to=hi@alyssa.is \
    --cc=devel@spectrum-os.org \
    --cc=ivan.nikolaenko@unikie.com \
    --cc=jose.pekkarinen@unikie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).