diff --git a/pkgs/development/ruby-modules/bundler-app/default.nix b/pkgs/development/ruby-modules/bundler-app/default.nix index 99d1dd64dc4f..c8f61389ad3f 100644 --- a/pkgs/development/ruby-modules/bundler-app/default.nix +++ b/pkgs/development/ruby-modules/bundler-app/default.nix @@ -26,12 +26,13 @@ , allowSubstitutes ? false , meta ? {} , postBuild ? "" +, gemConfig ? null }@args: let basicEnv = (callPackage ../bundled-common {}) args; - cmdArgs = removeAttrs args [ "pname" "postBuild" ] + cmdArgs = removeAttrs args [ "pname" "postBuild" "gemConfig" ] // { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults in runCommand basicEnv.name cmdArgs '' diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile b/pkgs/tools/typesetting/asciidoctor/Gemfile index 92abd4f5cf2b..54509c601e36 100644 --- a/pkgs/tools/typesetting/asciidoctor/Gemfile +++ b/pkgs/tools/typesetting/asciidoctor/Gemfile @@ -4,4 +4,6 @@ gem 'asciidoctor-diagram' gem 'asciidoctor-bespoke' gem 'asciidoctor-pdf' gem 'asciidoctor-latex' +gem 'asciidoctor-mathematical' +gem 'coderay' gem 'pygments.rb' diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock index 25800ed3a1ca..6c52a2c416a1 100644 --- a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock +++ b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock @@ -1,82 +1,93 @@ GEM remote: https://rubygems.org/ specs: - Ascii85 (1.0.2) - addressable (2.5.0) - public_suffix (~> 2.0, >= 2.0.2) + Ascii85 (1.0.3) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) afm (0.2.2) - asciidoctor (1.5.6.1) + asciidoctor (1.5.6.2) asciidoctor-bespoke (1.0.0.alpha.1) asciidoctor (>= 1.5.0) slim (~> 3.0.6) thread_safe (~> 0.3.5) - asciidoctor-diagram (1.5.4) + asciidoctor-diagram (1.5.9) asciidoctor (~> 1.5.0) asciidoctor-latex (1.5.0.17.dev) asciidoctor (~> 1.5, >= 1.5.2) htmlentities (~> 4.3) opal (~> 0.6.3) + asciidoctor-mathematical (0.2.2) + asciidoctor (~> 1.5, >= 1.5.0) + mathematical (~> 1.5, >= 1.5.8) + ruby-enum (~> 0.4) asciidoctor-pdf (1.5.0.alpha.16) asciidoctor (>= 1.5.0) - prawn (>= 1.3.0, < 3.0.0) - prawn-icon (= 1.2.0) - prawn-svg (>= 0.21.0, < 0.26.0) + prawn (>= 1.3.0, < 2.3.0) + prawn-icon (= 1.3.0) + prawn-svg (>= 0.21.0, < 0.28.0) prawn-table (= 0.2.2) - prawn-templates (= 0.0.3) + prawn-templates (>= 0.0.3, <= 0.1.1) safe_yaml (~> 1.0.4) - thread_safe (~> 0.3.5) + thread_safe (~> 0.3.6) treetop (= 1.5.3) - concurrent-ruby (1.0.4) - css_parser (1.4.8) + coderay (1.1.2) + concurrent-ruby (1.0.5) + css_parser (1.6.0) addressable hashery (2.1.2) htmlentities (4.3.4) - json (2.0.3) - multi_json (1.12.1) + i18n (1.0.0) + concurrent-ruby (~> 1.0) + json (2.1.0) + mathematical (1.6.11) + ruby-enum (~> 0.4) + multi_json (1.13.1) opal (0.6.3) source_map sprockets - pdf-core (0.6.1) - pdf-reader (1.4.1) + pdf-core (0.7.0) + pdf-reader (2.1.0) Ascii85 (~> 1.0.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk polyglot (0.3.5) - prawn (2.1.0) - pdf-core (~> 0.6.1) - ttfunk (~> 1.4.0) - prawn-icon (1.2.0) + prawn (2.2.2) + pdf-core (~> 0.7.0) + ttfunk (~> 1.5) + prawn-icon (1.3.0) prawn (>= 1.1.0, < 3.0.0) - prawn-svg (0.25.2) + prawn-svg (0.27.1) css_parser (~> 1.3) prawn (>= 0.11.1, < 3) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) - prawn-templates (0.0.3) - pdf-reader (~> 1.3) - prawn (>= 0.15.0) - public_suffix (2.0.5) - pygments.rb (1.1.1) + prawn-templates (0.1.1) + pdf-reader (~> 2.0) + prawn (~> 2.2) + public_suffix (3.0.2) + pygments.rb (1.2.1) multi_json (>= 1.0.0) - rack (2.0.1) + rack (2.0.4) + ruby-enum (0.7.2) + i18n ruby-rc4 (0.1.5) safe_yaml (1.0.4) - slim (3.0.7) - temple (~> 0.7.6) + slim (3.0.9) + temple (>= 0.7.6, < 0.9) tilt (>= 1.3.3, < 2.1) source_map (3.0.1) json sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - temple (0.7.7) - thread_safe (0.3.5) - tilt (2.0.6) + temple (0.8.0) + thread_safe (0.3.6) + tilt (2.0.8) treetop (1.5.3) polyglot (~> 0.3) - ttfunk (1.4.0) + ttfunk (1.5.1) PLATFORMS ruby @@ -86,8 +97,10 @@ DEPENDENCIES asciidoctor-bespoke asciidoctor-diagram asciidoctor-latex + asciidoctor-mathematical asciidoctor-pdf + coderay pygments.rb BUNDLED WITH - 1.13.6 + 1.14.6 diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix index 02b57ee3a13b..f8cfe44cbd73 100644 --- a/pkgs/tools/typesetting/asciidoctor/default.nix +++ b/pkgs/tools/typesetting/asciidoctor/default.nix @@ -1,4 +1,8 @@ -{ stdenv, lib, bundlerApp, ruby, curl }: +{ stdenv, lib, bundlerApp, ruby, curl + # Dependencies of the 'mathematical' package +, cmake, bison, flex, glib, pkgconfig, cairo +, pango, gdk_pixbuf, libxml2, python3, patchelf +}: bundlerApp { inherit ruby; @@ -11,8 +15,37 @@ bundlerApp { "asciidoctor-latex" "asciidoctor-pdf" "asciidoctor-safe" + "asciidoctor-mathematical" ]; + gemConfig = { + mathematical = attrs: { + buildInputs = [ + cmake + bison + flex + glib + pkgconfig + cairo + pango + gdk_pixbuf + libxml2 + python3 + ]; + + # The ruby build script takes care of this + dontUseCmakeConfigure = true; + + # For some reason 'mathematical.so' is missing cairo and glib in its RPATH, add them explicitly here + postFixup = lib.optionalString stdenv.isLinux '' + soPath="$out/lib/ruby/gems/2.4.0/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so" + ${patchelf}/bin/patchelf \ + --set-rpath "${lib.makeLibraryPath [ glib cairo ]}:$(${patchelf}/bin/patchelf --print-rpath "$soPath")" \ + "$soPath" + ''; + }; + }; + meta = with lib; { description = "A faster Asciidoc processor written in Ruby"; homepage = http://asciidoctor.org/; diff --git a/pkgs/tools/typesetting/asciidoctor/gemset.nix b/pkgs/tools/typesetting/asciidoctor/gemset.nix index 43011b22b76a..4ae146d289ba 100644 --- a/pkgs/tools/typesetting/asciidoctor/gemset.nix +++ b/pkgs/tools/typesetting/asciidoctor/gemset.nix @@ -1,11 +1,12 @@ { addressable = { + dependencies = ["public_suffix"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw"; + sha256 = "0viqszpkggqi8hq87pqp0xykhvz60g99nwmkwsb0v45kc2liwxvk"; type = "gem"; }; - version = "2.5.0"; + version = "2.5.2"; }; afm = { source = { @@ -18,20 +19,21 @@ Ascii85 = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0j95sbxd18kc8rhcnvl1w37kflqpax1r12h1x47gh4xxn3mz4m7q"; + sha256 = "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"; type = "gem"; }; - version = "1.0.2"; + version = "1.0.3"; }; asciidoctor = { source = { remotes = ["https://rubygems.org"]; - sha256 = "c4371c419306d69152809eb896c291ca09969dc26ca34be36f4eab82914fceca"; + sha256 = "0zq3az4836nxkc8g5wnnbzmarw7663s1ky6gf8pc04sfpa8n2l3f"; type = "gem"; }; - version = "1.5.6.1"; + version = "1.5.6.2"; }; asciidoctor-bespoke = { + dependencies = ["asciidoctor" "slim" "thread_safe"]; source = { remotes = ["https://rubygems.org"]; sha256 = "1awy933sswxvi2hxpll3rh9phxcvmqhrbb91m6ibjchnf7qsl3zk"; @@ -40,14 +42,16 @@ version = "1.0.0.alpha.1"; }; asciidoctor-diagram = { + dependencies = ["asciidoctor"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "06kqlij2yc84zqxmb39bqi9pihapgac7gxyzrwm4kxfnmfdqmxrk"; + sha256 = "0rj02i00d9hkzqzzrk5al9rn8yv5x0wsnrv9y6j4k8rfylm69c1r"; type = "gem"; }; - version = "1.5.4"; + version = "1.5.9"; }; asciidoctor-latex = { + dependencies = ["asciidoctor" "htmlentities" "opal"]; source = { remotes = ["https://rubygems.org"]; sha256 = "02qvn1ngp4s9y22vk23zzssd4w1bpyk84akjwiq6nqn8im6s4awz"; @@ -55,29 +59,48 @@ }; version = "1.5.0.17.dev"; }; - asciidoctor-pdf = { + asciidoctor-mathematical = { + dependencies = ["asciidoctor" "mathematical" "ruby-enum"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0f6b2a1533577dfba218de5dd886771447e4d1cb670b81d2c3bf3a180e6029a1"; + sha256 = "18igbvs70dnlrzgl62jcc0vfxhlb4r7v9bq3qf1v80l17lvq1x8f"; + type = "gem"; + }; + version = "0.2.2"; + }; + asciidoctor-pdf = { + dependencies = ["asciidoctor" "prawn" "prawn-icon" "prawn-svg" "prawn-table" "prawn-templates" "safe_yaml" "thread_safe" "treetop"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1899c071hfmzqg9822v7rg8y8iqlfy3dhpfy32ignzap6cajlsqg"; type = "gem"; }; version = "1.5.0.alpha.16"; }; + coderay = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"; + type = "gem"; + }; + version = "1.1.2"; + }; concurrent-ruby = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0p7ji1h1l407kci9w4b4yspzd58ssmlx7p91npx55kw08836dlpb"; + sha256 = "183lszf5gx84kcpb779v6a2y0mx9sssy8dgppng1z9a505nj1qcf"; type = "gem"; }; - version = "1.0.4"; + version = "1.0.5"; }; css_parser = { + dependencies = ["addressable"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1aqv5ds1109s0g76ybvvaff41a71i03fjy0ix6272r8n0gdnjc3f"; + sha256 = "0gwvf8mc8gnz4aizfijplv3594998h2j44ydakpzsdmkivs07v61"; type = "gem"; }; - version = "1.4.8"; + version = "1.6.0"; }; hashery = { source = { @@ -95,23 +118,42 @@ }; version = "4.3.4"; }; + i18n = { + dependencies = ["concurrent-ruby"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "191c2xzlvn42sb8dz6gjy0qaigri4chfvflg3d4k6n58flm0yp65"; + type = "gem"; + }; + version = "1.0.0"; + }; json = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0cpw154il64w6q20rrnsbjx1cdfz1yrzz1lgdbpn59lcwc6mprql"; + sha256 = "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"; type = "gem"; }; - version = "2.0.3"; + version = "2.1.0"; + }; + mathematical = { + dependencies = ["ruby-enum"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06xkr613hmzbhmm6zv92zlcjyfp0a6i2b3q3hg24lmj4j5l85p21"; + type = "gem"; + }; + version = "1.6.11"; }; multi_json = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1wpc23ls6v2xbk3l1qncsbz16npvmw8p0b38l8czdzri18mp51xk"; + sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv"; type = "gem"; }; - version = "1.12.1"; + version = "1.13.1"; }; opal = { + dependencies = ["source_map" "sprockets"]; source = { remotes = ["https://rubygems.org"]; sha256 = "0dmdxhmg43ibd4bsldssslsz8870hzknwcxiv9l1838lh6hd390k"; @@ -122,18 +164,19 @@ pdf-core = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1s0h0kkddkivgpf7k1jni9nzqxw09d9bgcsvyga407ixbiipkgfy"; + sha256 = "19llwch2wfg51glb0kff0drfp3n6nb9vim4zlvzckxysksvxpby1"; type = "gem"; }; - version = "0.6.1"; + version = "0.7.0"; }; pdf-reader = { + dependencies = ["Ascii85" "afm" "hashery" "ruby-rc4" "ttfunk"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0ivmgm73jjk3hv7896mgld5ki8jhxdvksw766rqxp6i863y9v4jq"; + sha256 = "1b3ig4wpcgdbqa7yw0ahwbmikkkywn2a22bfmrknl5ls7g066x45"; type = "gem"; }; - version = "1.4.1"; + version = "2.1.0"; }; polyglot = { source = { @@ -144,30 +187,34 @@ version = "0.3.5"; }; prawn = { + dependencies = ["pdf-core" "ttfunk"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "18f99v3r0jzym38s68hr0y8anrilv98shmsdf763ascd0gc5dj2n"; + sha256 = "1qdjf1v6sfl44g3rqxlg8k4jrzkwaxgvh2l4xws97a8f3xv4na4m"; type = "gem"; }; - version = "2.1.0"; + version = "2.2.2"; }; prawn-icon = { + dependencies = ["prawn"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "101npavqvv5w44vgphlkqn3gdawxmsnd4j8bk6lzbxz7niqgaqny"; + sha256 = "1pz8n7ajkfmflw05dib2l9qkzkfzwwbzx63qcvjr14k1dnbpx7qk"; type = "gem"; }; - version = "1.2.0"; + version = "1.3.0"; }; prawn-svg = { + dependencies = ["css_parser" "prawn"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "19zc7i6jxycs9m00frvv9g3x98sgzsyb1xf1xnn3h1ki574ibnip"; + sha256 = "0fykcs10q2j6h04riav1kzrw77mga6gh1rxbh7q0ab6gkr0wamzx"; type = "gem"; }; - version = "0.25.2"; + version = "0.27.1"; }; prawn-table = { + dependencies = ["prawn"]; source = { remotes = ["https://rubygems.org"]; sha256 = "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"; @@ -176,36 +223,47 @@ version = "0.2.2"; }; prawn-templates = { + dependencies = ["pdf-reader" "prawn"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0d14sq01c5zn0ywzazwcz6lkk235za36km53wqbf1bqabdb1ls10"; + sha256 = "1gs894sj9zdlwx59h3rk4p0l3y8r18p22zhnfiyx9lngsa56gcrj"; type = "gem"; }; - version = "0.0.3"; + version = "0.1.1"; }; public_suffix = { source = { remotes = ["https://rubygems.org"]; - sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q"; + sha256 = "1x5h1dh1i3gwc01jbg01rly2g6a1qwhynb1s8a30ic507z1nh09s"; type = "gem"; }; - version = "2.0.5"; + version = "3.0.2"; }; "pygments.rb" = { + dependencies = ["multi_json"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0g0ipgxqfw0vf2md3s8sqf8y7m5lxqza2gwnr05z3vrf1nc6v6hk"; + sha256 = "0lbvnwvz770ambm4d6lxgc2097rydn5rcc5d6986bnkzyxfqqjnv"; type = "gem"; }; - version = "1.1.1"; + version = "1.2.1"; }; rack = { source = { remotes = ["https://rubygems.org"]; - sha256 = "053bqbrxr5gjw5k3rrmh6i35s83kgdycxv292lid072vpwrq1xv1"; + sha256 = "1mfriw2r2913dv8qf3p87n7yal3qfsrs478x2qz106v8vhmxa017"; type = "gem"; }; - version = "2.0.1"; + version = "2.0.4"; + }; + ruby-enum = { + dependencies = ["i18n"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0h62avini866kxpjzqxlqnajma3yvj0y25l6hn9h2mv5pp6fcrhx"; + type = "gem"; + }; + version = "0.7.2"; }; ruby-rc4 = { source = { @@ -224,14 +282,16 @@ version = "1.0.4"; }; slim = { + dependencies = ["temple" "tilt"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "122hmc2kn3g151m8c41imadw29mghnsjwyzj8wav5zb1q69y4iqp"; + sha256 = "0zwz083xsbnlrma1pfkzrqc1fqm90fidn915vlifvkzl5fs43pvl"; type = "gem"; }; - version = "3.0.7"; + version = "3.0.9"; }; source_map = { + dependencies = ["json"]; source = { remotes = ["https://rubygems.org"]; sha256 = "0fviv92glr51v2zqy4i5jzi3hzpvjrcwyrxddcfr84ki65zb7pkv"; @@ -240,6 +300,7 @@ version = "3.0.1"; }; sprockets = { + dependencies = ["concurrent-ruby" "rack"]; source = { remotes = ["https://rubygems.org"]; sha256 = "0sv3zk5hwxyjvg7iy9sggjc7k3mfxxif7w8p260rharfyib939ar"; @@ -250,28 +311,29 @@ temple = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0xlf1if32xj14mkfwh8nxy3zzjzd9lipni0v2bghknp2kfc1hcz6"; + sha256 = "00nxf610nzi4n1i2lkby43nrnarvl89fcl6lg19406msr0k3ycmq"; type = "gem"; }; - version = "0.7.7"; + version = "0.8.0"; }; thread_safe = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1hq46wqsyylx5afkp6jmcihdpv4ynzzq9ygb6z2pb1cbz5js0gcr"; + sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"; type = "gem"; }; - version = "0.3.5"; + version = "0.3.6"; }; tilt = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0qsyzq2k7blyp1rph56xczwfqi8gplns2whswyr67mdfzdi60vvm"; + sha256 = "0020mrgdf11q23hm1ddd6fv691l51vi10af00f137ilcdb2ycfra"; type = "gem"; }; - version = "2.0.6"; + version = "2.0.8"; }; treetop = { + dependencies = ["polyglot"]; source = { remotes = ["https://rubygems.org"]; sha256 = "0wpl5z33796nz2ah44waflrd1girbra281d9i3m9nz4ylg1ljg5b"; @@ -282,9 +344,9 @@ ttfunk = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1k725rji58i0qx5xwf7p9d07cmhmjixqkdvhg1wk3rpp1753cf1j"; + sha256 = "1mgrnqla5n51v4ivn844albsajkck7k6lviphfqa8470r46c58cd"; type = "gem"; }; - version = "1.4.0"; + version = "1.5.1"; }; }