summary refs log tree commit diff
path: root/pkgs/tools/typesetting/asciidoctor/default.nix
blob: 0704600916aae23cac159c751641ee051af07be2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, bundlerApp, mkShell, bundix }:

let app = bundlerApp {
    pname = "asciidoctor";
    gemdir = ./.;

    exes = [
      "asciidoctor"
      "asciidoctor-pdf"
      "asciidoctor-safe"
      "asciidoctor-epub3"
    ];

    meta = with lib; {
      description = "A faster Asciidoc processor written in Ruby";
      homepage = https://asciidoctor.org/;
      license = licenses.mit;
      maintainers = with maintainers; [ gpyh ];
      platforms = platforms.unix;
    };
  };

  # Can't be defined directly in the passthru, since app.gems isn't defined at that point.
  shell = mkShell { 
    inputsFrom = lib.mapAttrs app.gems;
    buildInputs = [ bundix ]; 
  };
in app.overrideAttrs (attrs: { passthru = attrs.passthru // { updateShell = shell; }; })