summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorDanylo Hlynskyi <abcz2.uprola@gmail.com>2019-06-26 20:57:51 +0100
committerSarunas Valaskevicius <rakatan@gmail.com>2019-06-26 21:05:21 +0100
commita772b8633fb8da9826c344953bdfd83d03c72293 (patch)
tree98c377c8b4b0fd36b8fb5bf83ee411b76b4cf098 /pkgs/tools/typesetting
parent6ea5cf34b211b9ddcdb8a30cead68ee461b65c13 (diff)
asciidoctor: add update.sh for dependency updates
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix10
-rwxr-xr-xpkgs/tools/typesetting/asciidoctor/update.sh6
2 files changed, 14 insertions, 2 deletions
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