summary refs log tree commit diff
path: root/pkgs/tools/typesetting/asciidoctor
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2020-11-20 19:33:39 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2020-12-05 15:20:35 +0100
commit8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5 (patch)
tree7dc1f29f2c2d0fc7ae66b228730b221b6c8b79e7 /pkgs/tools/typesetting/asciidoctor
parent8c198469124d70e891df885f163a7818e3362bcd (diff)
downloadnixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar.gz
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar.bz2
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar.lz
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar.xz
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.tar.zst
nixpkgs-8f13d3cadac4dd7f4dc147c5ee59d119efb3ddf5.zip
asciidoctor: add revealjs support
This allows creating HTML presentations with
`asciidoctor-revealjs presentation.adoc`.

NOTE: The generated HTML file implicitly depend on reveal.js (and I see
no good way to bundle it with Nix). Either provide reveal.js in a local
path next to the generated HTML file[1], or override the revealjsdir
attribute, for example by pointing to an URL (can also be a path):

  asciidoctor-revealjs -a revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2 presentation.adoc

Implementation details:
1. Added "gem 'asciidoctor-revealjs'" to the Gemfile.
2. Ran "nix-shell -p bundler --run 'bundle lock --update'"
   from pkgs/tools/typesetting/asciidoctor/.
3. Hand edited Gemfile.lock to remove all but the asciidoctor-revealjs
   changes. (Rationale: allow backporting to release-20.09.)
4. Finish off with "nix-shell -p bundix --run 'bundix'".

[1] Of course Nix can help with _that_, but that's external to the
asciidoctor-revealjs program.
Diffstat (limited to 'pkgs/tools/typesetting/asciidoctor')
-rw-r--r--pkgs/tools/typesetting/asciidoctor/Gemfile1
-rw-r--r--pkgs/tools/typesetting/asciidoctor/Gemfile.lock9
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix1
-rw-r--r--pkgs/tools/typesetting/asciidoctor/gemset.nix42
4 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile b/pkgs/tools/typesetting/asciidoctor/Gemfile
index f9329a80a81..702dabee2e0 100644
--- a/pkgs/tools/typesetting/asciidoctor/Gemfile
+++ b/pkgs/tools/typesetting/asciidoctor/Gemfile
@@ -4,6 +4,7 @@ gem 'asciidoctor-diagram'
 gem 'asciidoctor-pdf'
 gem 'asciidoctor-epub3'
 gem 'asciidoctor-mathematical'
+gem 'asciidoctor-revealjs'
 gem 'coderay'
 gem 'pygments.rb'
 gem 'rouge'
diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
index c928e954875..06a1716251a 100644
--- a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
+++ b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
@@ -28,6 +28,11 @@ GEM
       safe_yaml (~> 1.0.0)
       thread_safe (~> 0.3.0)
       treetop (~> 1.5.0)
+    asciidoctor-revealjs (4.0.1)
+      asciidoctor (>= 2.0.0, < 3.0.0)
+      concurrent-ruby (~> 1.0)
+      thread_safe (~> 0.3.5)
+    asciimath (2.0.1)
     coderay (1.1.2)
     concurrent-ruby (1.1.5)
     css_parser (1.7.0)
@@ -40,6 +45,9 @@ GEM
       concurrent-ruby (~> 1.0)
     mathematical (1.6.12)
       ruby-enum (~> 0.4)
+    mime-types (3.3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2020.1104)
     mini_portile2 (2.4.0)
     multi_json (1.13.1)
     nokogiri (1.10.3)
@@ -88,6 +96,7 @@ DEPENDENCIES
   asciidoctor-epub3
   asciidoctor-mathematical
   asciidoctor-pdf
+  asciidoctor-revealjs
   coderay
   pygments.rb
   rouge
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index 7a01dc2ff0a..29b2b567be2 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -13,6 +13,7 @@ let
       "asciidoctor"
       "asciidoctor-pdf"
       "asciidoctor-epub3"
+      "asciidoctor-revealjs"
     ];
 
     buildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/typesetting/asciidoctor/gemset.nix b/pkgs/tools/typesetting/asciidoctor/gemset.nix
index 02700962eb2..db47fbf2285 100644
--- a/pkgs/tools/typesetting/asciidoctor/gemset.nix
+++ b/pkgs/tools/typesetting/asciidoctor/gemset.nix
@@ -84,6 +84,27 @@
     };
     version = "1.5.0.alpha.18";
   };
+  asciidoctor-revealjs = {
+    dependencies = ["asciidoctor" "concurrent-ruby" "thread_safe"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "084aq9frv4irzgd9ab3xad9i0ml9lb58w0wvg76gnwwr51plbpp4";
+      type = "gem";
+    };
+    version = "4.0.1";
+  };
+  asciimath = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1aapydwwkydbwgz07n7ma3a5jy9n3v0shy6q6j8mi4wr3crhx45a";
+      type = "gem";
+    };
+    version = "2.0.1";
+  };
   coderay = {
     groups = ["default"];
     platforms = [];
@@ -158,6 +179,27 @@
     };
     version = "1.6.12";
   };
+  mime-types = {
+    dependencies = ["mime-types-data"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
+      type = "gem";
+    };
+    version = "3.3.1";
+  };
+  mime-types-data = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0ipjyfwn9nlvpcl8knq3jk4g5f12cflwdbaiqxcq1s7vwfwfxcag";
+      type = "gem";
+    };
+    version = "3.2020.1104";
+  };
   mini_portile2 = {
     groups = ["default"];
     platforms = [];