summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorlprndn <lprndn@gmail.com>2017-04-03 21:37:11 +0200
committerGitHub <noreply@github.com>2017-04-03 21:37:11 +0200
commitf259fa6e913ab24077385cc7c76af2b60cacad60 (patch)
treeed63184d719eeb887842d0f9ff0c856cc017fbae /pkgs/tools/typesetting
parent8a534d53281c5aead91a67ca526d8cb7f27a14c5 (diff)
parent75319eb2035e7c9ec0a8f45ab816dd34689fd77a (diff)
downloadnixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar.gz
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar.bz2
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar.lz
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar.xz
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.tar.zst
nixlib-f259fa6e913ab24077385cc7c76af2b60cacad60.zip
Merge branch 'master' into lprndn_Nixpkgs
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/asciidoctor/Gemfile1
-rw-r--r--pkgs/tools/typesetting/asciidoctor/Gemfile.lock22
-rw-r--r--pkgs/tools/typesetting/asciidoctor/gemset.nix56
-rw-r--r--pkgs/tools/typesetting/fop/default.nix7
-rw-r--r--pkgs/tools/typesetting/htmldoc/default.nix34
-rw-r--r--pkgs/tools/typesetting/pdf2htmlEX/add-glib-cmake.patch17
-rw-r--r--pkgs/tools/typesetting/pdf2htmlEX/default.nix1
-rw-r--r--pkgs/tools/typesetting/sile/default.nix64
-rw-r--r--pkgs/tools/typesetting/tex/tex4ht/default.nix1
-rw-r--r--pkgs/tools/typesetting/tex/texlive/combine.nix1
10 files changed, 177 insertions, 27 deletions
diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile b/pkgs/tools/typesetting/asciidoctor/Gemfile
index d382e6397e15..92abd4f5cf2b 100644
--- a/pkgs/tools/typesetting/asciidoctor/Gemfile
+++ b/pkgs/tools/typesetting/asciidoctor/Gemfile
@@ -4,3 +4,4 @@ gem 'asciidoctor-diagram'
 gem 'asciidoctor-bespoke'
 gem 'asciidoctor-pdf'
 gem 'asciidoctor-latex'
+gem 'pygments.rb'
diff --git a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
index 0212db3816a1..34ed4a975a10 100644
--- a/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
+++ b/pkgs/tools/typesetting/asciidoctor/Gemfile.lock
@@ -2,14 +2,15 @@ GEM
   remote: https://rubygems.org/
   specs:
     Ascii85 (1.0.2)
-    addressable (2.4.0)
+    addressable (2.5.0)
+      public_suffix (~> 2.0, >= 2.0.2)
     afm (0.2.2)
     asciidoctor (1.5.5)
     asciidoctor-bespoke (1.0.0.alpha.1)
       asciidoctor (>= 1.5.0)
       slim (~> 3.0.6)
       thread_safe (~> 0.3.5)
-    asciidoctor-diagram (1.5.2)
+    asciidoctor-diagram (1.5.4)
       asciidoctor (~> 1.5.0)
     asciidoctor-latex (1.5.0.17.dev)
       asciidoctor (~> 1.5, >= 1.5.2)
@@ -25,17 +26,18 @@ GEM
       safe_yaml (~> 1.0.4)
       thread_safe (~> 0.3.5)
       treetop (= 1.5.3)
-    concurrent-ruby (1.0.2)
-    css_parser (1.4.6)
+    concurrent-ruby (1.0.4)
+    css_parser (1.4.8)
       addressable
     hashery (2.1.2)
     htmlentities (4.3.4)
-    json (2.0.2)
+    json (2.0.3)
+    multi_json (1.12.1)
     opal (0.6.3)
       source_map
       sprockets
     pdf-core (0.6.1)
-    pdf-reader (1.4.0)
+    pdf-reader (1.4.1)
       Ascii85 (~> 1.0.0)
       afm (~> 0.2.1)
       hashery (~> 2.0)
@@ -55,6 +57,9 @@ GEM
     prawn-templates (0.0.3)
       pdf-reader (~> 1.3)
       prawn (>= 0.15.0)
+    public_suffix (2.0.5)
+    pygments.rb (1.1.1)
+      multi_json (>= 1.0.0)
     rack (2.0.1)
     ruby-rc4 (0.1.5)
     safe_yaml (1.0.4)
@@ -63,12 +68,12 @@ GEM
       tilt (>= 1.3.3, < 2.1)
     source_map (3.0.1)
       json
-    sprockets (3.7.0)
+    sprockets (3.7.1)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
     temple (0.7.7)
     thread_safe (0.3.5)
-    tilt (2.0.5)
+    tilt (2.0.6)
     treetop (1.5.3)
       polyglot (~> 0.3)
     ttfunk (1.4.0)
@@ -82,6 +87,7 @@ DEPENDENCIES
   asciidoctor-diagram
   asciidoctor-latex
   asciidoctor-pdf
+  pygments.rb
 
 BUNDLED WITH
    1.13.6
diff --git a/pkgs/tools/typesetting/asciidoctor/gemset.nix b/pkgs/tools/typesetting/asciidoctor/gemset.nix
index 4c26c6a434a0..c436d6f97518 100644
--- a/pkgs/tools/typesetting/asciidoctor/gemset.nix
+++ b/pkgs/tools/typesetting/asciidoctor/gemset.nix
@@ -2,10 +2,10 @@
   addressable = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0mpn7sbjl477h56gmxsjqb89r5s3w7vx5af994ssgc3iamvgzgvs";
+      sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw";
       type = "gem";
     };
-    version = "2.4.0";
+    version = "2.5.0";
   };
   afm = {
     source = {
@@ -42,10 +42,10 @@
   asciidoctor-diagram = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1di271v0ic6d5xkqbbwg6scjyj1ypklgy211gdmhf18xzpka3fvi";
+      sha256 = "06kqlij2yc84zqxmb39bqi9pihapgac7gxyzrwm4kxfnmfdqmxrk";
       type = "gem";
     };
-    version = "1.5.2";
+    version = "1.5.4";
   };
   asciidoctor-latex = {
     source = {
@@ -66,18 +66,18 @@
   concurrent-ruby = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1kb4sav7yli12pjr8lscv8z49g52a5xzpfg3z9h8clzw6z74qjsw";
+      sha256 = "0p7ji1h1l407kci9w4b4yspzd58ssmlx7p91npx55kw08836dlpb";
       type = "gem";
     };
-    version = "1.0.2";
+    version = "1.0.4";
   };
   css_parser = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0zsldn0ihmzl7nqk4lww9h8ijv1zb3l8g92y7b4w0da2d6cnyjw8";
+      sha256 = "1aqv5ds1109s0g76ybvvaff41a71i03fjy0ix6272r8n0gdnjc3f";
       type = "gem";
     };
-    version = "1.4.6";
+    version = "1.4.8";
   };
   hashery = {
     source = {
@@ -98,10 +98,18 @@
   json = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1lhinj9vj7mw59jqid0bjn2hlfcnq02bnvsx9iv81nl2han603s0";
+      sha256 = "0cpw154il64w6q20rrnsbjx1cdfz1yrzz1lgdbpn59lcwc6mprql";
+      type = "gem";
+    };
+    version = "2.0.3";
+  };
+  multi_json = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1wpc23ls6v2xbk3l1qncsbz16npvmw8p0b38l8czdzri18mp51xk";
       type = "gem";
     };
-    version = "2.0.2";
+    version = "1.12.1";
   };
   opal = {
     source = {
@@ -122,10 +130,10 @@
   pdf-reader = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0j9cimzw2waic800108qmnds7w33xd9y3bdvf9qzijwv9wjv0iq1";
+      sha256 = "0ivmgm73jjk3hv7896mgld5ki8jhxdvksw766rqxp6i863y9v4jq";
       type = "gem";
     };
-    version = "1.4.0";
+    version = "1.4.1";
   };
   polyglot = {
     source = {
@@ -175,6 +183,22 @@
     };
     version = "0.0.3";
   };
+  public_suffix = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q";
+      type = "gem";
+    };
+    version = "2.0.5";
+  };
+  "pygments.rb" = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0g0ipgxqfw0vf2md3s8sqf8y7m5lxqza2gwnr05z3vrf1nc6v6hk";
+      type = "gem";
+    };
+    version = "1.1.1";
+  };
   rack = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -218,10 +242,10 @@
   sprockets = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0jzsfiladswnzbrwqfiaj1xip68y58rwx0lpmj907vvq47k87gj1";
+      sha256 = "0sv3zk5hwxyjvg7iy9sggjc7k3mfxxif7w8p260rharfyib939ar";
       type = "gem";
     };
-    version = "3.7.0";
+    version = "3.7.1";
   };
   temple = {
     source = {
@@ -242,10 +266,10 @@
   tilt = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0lgk8bfx24959yq1cn55php3321wddw947mgj07bxfnwyipy9hqf";
+      sha256 = "0qsyzq2k7blyp1rph56xczwfqi8gplns2whswyr67mdfzdi60vvm";
       type = "gem";
     };
-    version = "2.0.5";
+    version = "2.0.6";
   };
   treetop = {
     source = {
diff --git a/pkgs/tools/typesetting/fop/default.nix b/pkgs/tools/typesetting/fop/default.nix
index 473b23fe2627..aff11fd61279 100644
--- a/pkgs/tools/typesetting/fop/default.nix
+++ b/pkgs/tools/typesetting/fop/default.nix
@@ -1,11 +1,12 @@
 { fetchurl, stdenv, ant, jdk }:
 
 stdenv.mkDerivation rec {
-  name = "fop-1.1";
+  name = "fop-${version}";
+  version = "2.1";
 
   src = fetchurl {
     url = "mirror://apache/xmlgraphics/fop/source/${name}-src.tar.gz";
-    sha256 = "08i56d57w5dl5bqchr34x9165hvi5h4bhiflxhi0a4wd56rlq5jq";
+    sha256 = "165rx13q47l6qc29ppr7sg1z26vw830s3rkklj5ap7wgvy0ivbz5";
   };
 
   buildInputs = [ ant jdk ];
@@ -45,6 +46,6 @@ stdenv.mkDerivation rec {
     homepage = http://xmlgraphics.apache.org/fop/;
     license = licenses.asl20;
     platforms = platforms.linux;
-    maintainers = [ maintainers.bjornfor ];
+    maintainers = with maintainers; [ bjornfor ndowens ];
   };
 }
diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix
new file mode 100644
index 000000000000..b9d5407c68de
--- /dev/null
+++ b/pkgs/tools/typesetting/htmldoc/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl
+
+, SystemConfiguration ? null, Foundation ? null
+}:
+
+assert stdenv.isDarwin -> SystemConfiguration != null
+                       && Foundation != null;
+
+stdenv.mkDerivation rec {
+  version = "1.8.29";
+  name = "htmldoc-${version}";
+  src = fetchurl {
+    url = "https://github.com/michaelrsweet/htmldoc/releases/download"
+      + "/release-${version}/htmldoc-${version}-source.tar.gz";
+    sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0";
+  };
+  buildInputs = with stdenv;
+       lib.optional isDarwin SystemConfiguration
+    ++ lib.optional isDarwin Foundation;
+
+  meta = with stdenv.lib; {
+    description = "Converts HTML files to PostScript and PDF";
+    homepage    = https://michaelrsweet.github.io/htmldoc;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ viric shanemikel ];
+    platforms   = with platforms; linux ++ darwin;
+
+    longDescription = ''
+      HTMLDOC is a program that reads HTML source files or web pages and
+      generates corresponding HTML, PostScript, or PDF files with an optional
+      table of contents.
+    '';
+  };
+}
diff --git a/pkgs/tools/typesetting/pdf2htmlEX/add-glib-cmake.patch b/pkgs/tools/typesetting/pdf2htmlEX/add-glib-cmake.patch
new file mode 100644
index 000000000000..8e1d9dfc1914
--- /dev/null
+++ b/pkgs/tools/typesetting/pdf2htmlEX/add-glib-cmake.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3fdabb0..378621a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,6 +59,12 @@ include_directories(${FONTFORGE_INCLUDE_DIRS})
+ link_directories(${FONTFORGE_LIBRARY_DIRS})
+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES})
+ 
++# add glib dependency
++pkg_check_modules(GLIB REQUIRED glib-2.0)
++include_directories(${GLIB_INCLUDE_DIRS})
++link_directories(${GLIB_INCLUDE_DIRS})
++set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${GLIB_LIBRARIES})
++
+ # debug build flags (overwrite default cmake debug flags)
+ set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")
+ set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -pg")
diff --git a/pkgs/tools/typesetting/pdf2htmlEX/default.nix b/pkgs/tools/typesetting/pdf2htmlEX/default.nix
index 299f075115ad..a75e883b179b 100644
--- a/pkgs/tools/typesetting/pdf2htmlEX/default.nix
+++ b/pkgs/tools/typesetting/pdf2htmlEX/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchFromGitHub, cmake, pkgconfig
 , poppler, xlibs, pcre, python, glib, fontforge, cairo, pango, openjdk8
+
 }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix
new file mode 100644
index 000000000000..2c34a9aff32b
--- /dev/null
+++ b/pkgs/tools/typesetting/sile/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig
+, harfbuzz, icu, lpeg, luaexpat, luazlib, luafilesystem
+, fontconfig, lua, libiconv
+}:
+
+with stdenv.lib;
+
+let
+
+  libs          = [lpeg luaexpat luazlib luafilesystem];
+  getPath       = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}";
+  getLuaPath    = lib : getPath lib "lua";
+  getLuaCPath   = lib : getPath lib "so";
+  luaPath       = concatStringsSep ";" (map getLuaPath libs);
+  luaCPath      = concatStringsSep ";" (map getLuaCPath libs);
+
+in
+
+stdenv.mkDerivation rec {
+  name = "sile-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "https://github.com/simoncozens/sile/releases/download/v${version}/${name}.tar.bz2";
+    sha256 = "1mald727hy9bi17rcaph8q400yn5xqkn5f2xf1408g94wmwncs8w";
+  };
+
+  nativeBuildInputs = [pkgconfig makeWrapper];
+  buildInputs = [ harfbuzz icu lua lpeg luaexpat luazlib luafilesystem fontconfig libiconv ]
+  ++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
+  ;
+
+  preConfigure = optionalString stdenv.isDarwin ''
+    sed -i -e 's|@import AppKit;|#import <AppKit/AppKit.h>|' src/macfonts.m
+  '';
+
+  NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework AppKit";
+
+  LUA_PATH = luaPath;
+  LUA_CPATH = luaCPath;
+
+  postInstall = ''
+    wrapProgram $out/bin/sile \
+      --set LUA_PATH "${luaPath};" \
+      --set LUA_CPATH "${luaCPath};" \
+  '';
+
+  meta = {
+    description = "A typesetting system";
+    longDescription = ''
+      SILE is a typesetting system; its job is to produce beautiful
+      printed documents. Conceptually, SILE is similar to TeX—from
+      which it borrows some concepts and even syntax and
+      algorithms—but the similarities end there. Rather than being a
+      derivative of the TeX family SILE is a new typesetting and
+      layout engine written from the ground up using modern
+      technologies and borrowing some ideas from graphical systems
+      such as InDesign.
+    '';
+    homepage = http://www.sile-typesetter.org;
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/tools/typesetting/tex/tex4ht/default.nix b/pkgs/tools/typesetting/tex/tex4ht/default.nix
index 5aaae2c06b2a..6f387b5bf8bc 100644
--- a/pkgs/tools/typesetting/tex/tex4ht/default.nix
+++ b/pkgs/tools/typesetting/tex/tex4ht/default.nix
@@ -34,5 +34,6 @@ stdenv.mkDerivation rec {
     description = "A system to convert (La)TeX documents to HTML and various other formats";
     license = stdenv.lib.licenses.lppl12;
     platforms = stdenv.lib.platforms.unix;
+    broken = true; # use the one from texlive.tex4ht
   };
 }
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix
index abfe951a33fe..c783316c6d55 100644
--- a/pkgs/tools/typesetting/tex/texlive/combine.nix
+++ b/pkgs/tools/typesetting/tex/texlive/combine.nix
@@ -111,6 +111,7 @@ in buildEnv {
         -e "s,\$SELFAUTODIR,$out/share,g" \
         -e "s,\$SELFAUTOPARENT,$out/share,g" \
         -e "s,\$SELFAUTOGRANDPARENT,$out/share,g" \
+        -e "/^mpost,/d" `# CVE-2016-10243` \
         "$cnfOrig" > ./texmf.cnf
 
       patchCnfLua "./texmfcnf.lua"