diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile b/pkgs/tools/typesetting/asciidoctor/Gemfile index 4edebabc4cd..bdaf1721227 100644 --- a/pkgs/tools/typesetting/asciidoctor/Gemfile +++ b/pkgs/tools/typesetting/asciidoctor/Gemfile @@ -5,3 +5,4 @@ gem 'asciidoctor-pdf' gem 'asciidoctor-mathematical' gem 'coderay' gem 'pygments.rb' +gem 'rouge' diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock index 7416bd0268e..2195e224bf8 100644 --- a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock +++ b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock @@ -54,9 +54,10 @@ GEM prawn-templates (0.1.1) pdf-reader (~> 2.0) prawn (~> 2.2) - public_suffix (3.1.0) + public_suffix (3.1.1) pygments.rb (1.2.1) multi_json (>= 1.0.0) + rouge (3.5.1) ruby-enum (0.7.2) i18n ruby-rc4 (0.1.5) @@ -76,6 +77,7 @@ DEPENDENCIES asciidoctor-pdf coderay pygments.rb + rouge BUNDLED WITH 1.17.2 diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix index 760cc41609e..0f9bb0ef7de 100644 --- a/pkgs/tools/typesetting/asciidoctor/default.nix +++ b/pkgs/tools/typesetting/asciidoctor/default.nix @@ -1,10 +1,10 @@ -{ stdenv, lib, bundlerApp, ruby +{ stdenv, lib, bundlerApp, ruby, bundix, mkShell # Dependencies of the 'mathematical' package , cmake, bison, flex, glib, pkgconfig, cairo , pango, gdk_pixbuf, libxml2, python3, patchelf }: -bundlerApp { +bundlerApp rec { inherit ruby; pname = "asciidoctor"; gemdir = ./.; @@ -43,6 +43,12 @@ bundlerApp { }; }; + passthru.updateShell = mkShell { + buildInputs = (gemConfig.mathematical {}).buildInputs ++ [ + bundix + ]; + }; + meta = with lib; { description = "A faster Asciidoc processor written in Ruby"; homepage = https://asciidoctor.org/; diff --git a/pkgs/tools/typesetting/asciidoctor/gemset.nix b/pkgs/tools/typesetting/asciidoctor/gemset.nix index aef9061e130..3e416600822 100644 --- a/pkgs/tools/typesetting/asciidoctor/gemset.nix +++ b/pkgs/tools/typesetting/asciidoctor/gemset.nix @@ -237,10 +237,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1c7c5xxkx91hwj4572hbnyvxmydb90q69wlpr2l0dxrmwx2p365l"; + sha256 = "0g9ds2ffzljl6jjmkjffwxc1z6lh5nkqqmhhkxjk71q5ggv0rkpm"; type = "gem"; }; - version = "3.1.0"; + version = "3.1.1"; }; "pygments.rb" = { dependencies = ["multi_json"]; @@ -253,6 +253,16 @@ }; version = "1.2.1"; }; + rouge = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yfhazlhjc4abgzhkgq8zqmdphvkh52211widkl4zhsbhqh8wg2q"; + type = "gem"; + }; + version = "3.5.1"; + }; ruby-enum = { dependencies = ["i18n"]; groups = ["default"]; diff --git a/pkgs/tools/typesetting/asciidoctor/update.sh b/pkgs/tools/typesetting/asciidoctor/update.sh new file mode 100755 index 00000000000..db7511330be --- /dev/null +++ b/pkgs/tools/typesetting/asciidoctor/update.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +rm gemset.nix Gemfile.lock +nix-shell ../../../.. -A asciidoctor.updateShell --run ' + bundix -m --bundle-pack-path $TMPDIR/asciidoctor-ruby-bundle +' +rm -r .bundle