diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix index 760cc41609e5..0f9bb0ef7de5 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/update.sh b/pkgs/tools/typesetting/asciidoctor/update.sh new file mode 100755 index 000000000000..db7511330bed --- /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